no-warning-comments
Added in v0.8.1Configuration
Rule Details
This rule reports comments that include any of the predefined terms specified in its configuration.
Options
This rule has an options object literal:
"terms": optional array of terms to match. Defaults to["todo", "fixme", "xxx"]. Terms are matched case-insensitively and as whole words:fixwould matchFIXbut notfixing. Terms can consist of multiple words:really bad idea."location": optional string that configures where in your comments to check for matches. Defaults to"start". The start is from the first non-decorative character, ignoring whitespace, new lines and characters specified indecoration. The other value is matchanywherein comments."decoration": optional array of characters that are ignored at the start of a comment, when location is"start". Defaults to[]. Any sequence of whitespace or the characters from this property are ignored. This option is ignored when location is"anywhere".
Examples of incorrect code for this rule with the default { "terms": ["todo", "fixme", "xxx"], "location": "start" } options:
Examples of correct code for this rule with the default { "terms": ["todo", "fixme", "xxx"], "location": "start" } options:
terms and location
Examples of incorrect code for the { "terms": ["todo", "fixme", "any other term"], "location": "anywhere" } options:
Examples of correct code for the { "terms": ["todo", "fixme", "any other term"], "location": "anywhere" } options:
Decoration Characters
Examples of incorrect code for the { "decoration": ["*"] } options:
Examples of incorrect code for the { "decoration": ["/", "*"] } options:
Examples of correct code for the { "decoration": ["/", "*"] } options: