Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expiring-todo-comments - more specific error message for missing conditions #744

Closed
mmkal opened this issue May 23, 2020 · 0 comments · Fixed by #1375
Closed

expiring-todo-comments - more specific error message for missing conditions #744

mmkal opened this issue May 23, 2020 · 0 comments · Fixed by #1375

Comments

@mmkal
Copy link
Contributor

mmkal commented May 23, 2020

Rather than falling back to no-warning-comments when "useless" todos are found, could the rule explicitly report something like TODO comment should have a condition or due date?

When I first saw Unexpected "todo" comment I thought "oh, this is a rule which aggressively says 'todos are bad'", and I turned it off. Later, I spent a bunch of time implementing a worse version of expiring-todo-comments, which parsed ISO dates. Eventually I stumbled across the docs and realised how useful this rule really is.

Basically the problem is that it's piggy-backing off eslint's error message, which is too broad and doesn't really nudge the user into fixing the problem - and risks pushing them into deleting the todo or turning off the rule.

mmkal added a commit to mmkal/eslint-plugin-unicorn that referenced this issue Jun 22, 2021
This is essentially the test case for sindresorhus#744 (fix to come).
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 a pull request may close this issue.

1 participant