Skip to content

Conversation

@Vladyslav-Soldatenko
Copy link

fix for #2745

@github-actions github-actions bot changed the title expiring-todo-comments: should not flag eslint disable comments expiring-todo-comments: should not flag eslint disable comments Nov 22, 2025
@Vladyslav-Soldatenko Vladyslav-Soldatenko force-pushed the feat/expiring-todo-eslint-directives branch from 7690333 to d0df7af Compare November 22, 2025 18:33
@@ -0,0 +1,47 @@
import {ConfigCommentParser} from '@eslint/plugin-kit';

const ESLINT_DISABLE_DIRECTIVES = new Set([
Copy link
Collaborator

@fisker fisker Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the link

// https://github.com/eslint/eslint/blob/ecd0ede7fd2ccbb4c0daf0e4732e97ea0f49db1b/lib/linter/linter.js#L509-L512

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@fisker fisker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fisker fisker marked this pull request as draft November 23, 2025 15:03
@fisker
Copy link
Collaborator

fisker commented Nov 23, 2025

@Vladyslav-Soldatenko Turns out there is an sourceCode.getDisableDirectives() we can use directly!

@fisker fisker marked this pull request as ready for review November 23, 2025 15:55
context.on('Program', function * () {
for (const directive of getEslintDisableDirectives(context)) {
if (directive.value) {
continue;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bug, using return instead of continue, introduced by me in #2571

@Vladyslav-Soldatenko
Copy link
Author

Hi. Are there any plans when the fix will be merged? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants