-
-
Notifications
You must be signed in to change notification settings - Fork 420
Open
Labels
Description
I like the expiring-todo-comments rule, but it is annoying to try to disable it for a single line when allowWarningComments: false is set.
I expected this to work:
// eslint-disable-next-line unicorn/expiring-todo-comments
// TODO without a dateBut the lint rule then flags the eslint-disable-next-line line itself as problematic!
The cumbersome workaround I've found is to use block disable comments instead (plus an extra next-line comment is required):
/* eslint-disable unicorn/expiring-todo-comments */
// TODO without a date
// eslint-disable-next-line unicorn/expiring-todo-comments
/* eslint-enable unicorn/expiring-todo-comments */I think there are two bugs here:
- It should ignore eslint-disable lines entirely.
- It should not match substrings that happen to have "todo" within them (eg, "Mastodon" or "-todo-").