Rule categories
Rule categories
The rule categories—namely “recommended”, “fixable”, and “hasSuggestions”—are shown in the rules page. They are rendered using the ruleCategories
macro (imported from /components/rule-categories.macro.html
). There is also an individual macro for each category type.
{ % from 'components/rule-categories.macro.html' import ruleCategories % }
{ { ruleCategories({
recommended: true,
fixable: true,
hasSuggestions: true
}) } }
Example
Using the recommended
config from @eslint/js
in a configuration file enables this rule
Some problems reported by this rule are automatically fixable by the --fix
command line option
Some problems reported by this rule are manually fixable by editor suggestions
A rule category
For every rule, you can render the category it belongs to using the corresponding category shortcode:
{ % recommended % }
{ % fixable % }
{ % hasSuggestions % }
Examples
if the “extends”: “eslint:recommended”
property in a configuration file enables the rule.
if some problems reported by the rule are automatically fixable by the –fix
command line option
if some problems reported by the rule are manually fixable by editor suggestions