eslint-plugin-todos ![npm version](https://badge.fury.io/js/eslint-plugin-todos.svg)
Contains single rule that detects TODO (or similar) comments which are not documented inside issue tracker (eq. have a link to an existing issue).
The link to the issue tracker can be either configured using url
property of the rule's configuration, or is
automatically detected from the package.json
using either bugs
or repository
properties.
This plugin is based on the no-warning-comments rule. Check out original documentation for no-warning-comments.
Fails
Passes
Install
npm install -D eslint-plugin-todos
Usage
module.exports = {
"plugins": ["todos"],
"rules": {
'todos/only-documented-todos': [
'warn', {
'terms': ['todo'],
'location': 'start',
'url': 'https://github.com/auhau/eslint-plugin-todos'
}
],
}
}
Credit
This rule was extended using eslint-plugin-output-todo-comments by finom