Warn TODOs without comment
See original GitHub issueWhen does this rule warn? Please describe and show example code:
// Good
// TODO: I'd like to find a way to make this faster
doSomething();
// Bad
// TODO
doSomething();
Is this rule preventing an error or is it stylistic?
stylistic
Why is this rule a candidate for inclusion instead of creating a custom rule?
It is specified in official code conventions:
Comments may be used to annotate pieces of code with additional information. TODO - indicates that the code is not yet complete. Information about the next steps should be included.
http://eslint.org/docs/developer-guide/code-conventions#comment-annotations
Also implemented by rubocop (linter for ruby). https://github.com/bbatsov/rubocop/blob/49598a035cd39a75ec91466a4e1a79c7e4f0f5f9/spec/rubocop/cop/style/comment_annotation_spec.rb
Are you willing to create the rule yourself?
yes…!
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Warn About TODOs - Visual Studio Marketplace
Visual Studio automatically takes code comments that include TODO and turns them into User Tasks that are displayed on the Task List.
Read more >TODO comments are not clean code. Use them correctly!
I have realized TODO comments should not be part of the production code. They can be practical in the development process. There is...
Read more >no-warning-comments - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Replace TODO comments in your code with WARNING log ...
About a year ago I stopped writing TODO comments in my code. I always forget about them and they rarely get found and...
Read more >How do I disable "TODO" warnings in pylint? - Stack Overflow
Note that if your # TODO comment starts at the start of a line (i.e. it's a block comment rather than an inline...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ypresto I’m sorry, there’s not enough support on the team for this. If you still want the rule, you can always create a custom rule instead.
I think maybe it should be a separate rule after all. Yes, I know I advocated the opposite earlier but I’ve come around.