no-inline-comments
UnreleasedConfiguration
rslint.config.ts
Rule Details
Some style guides disallow a comment on the same line as code. Comments alone on a line, or on a line consisting entirely of whitespace, are allowed.
This rule disallows comments on the same line as code.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
JSX exception
Comments that are the only content of a JSX expression container are not considered inline, since there is no code on either side of them.
Options
This rule accepts a single options object with the following property:
ignorePattern(string) - a pattern of comments to ignore
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": "webpackChunkName:\\s.+" } option: