Inline Directives
Rslint supports inline comments to disable or enable rules in source code. Both rslint- and eslint- prefixed directives are supported and fully equivalent.
Disable for the rest of the file
Re-enable rules
Disable for the current line
Disable for the next line
Notes
eslint-disable/eslint-enableand their variants are also supported for ESLint compatibility. The two prefixes can be mixed freely (e.g.rslint-disablepaired witheslint-enable).- Use block comments (
/* */) fordisableandenable. Line directives can also use//comments. - A
disable-linecomment must stay on one line. Adisable-next-lineblock comment applies to the line after its closing*/. - Omitting rule names disables/enables all rules.
- Multiple rule names can be separated by commas.
- To add a description, use two or more hyphens with whitespace on both sides (for example,
rslint-disable-next-line no-console -- temporary workaround). In a block comment, the description can span lines or be empty.