docs/src/library/rule.md
The rule component is a macro defined in /components/rule.macro.html. The macro accepts a set of parameters used to render the rule.
A rule has a:
deprecated and removed respectively<!-- import the macro -->
{ % from 'components/rule.macro.html' import rule % }
<!-- use the macro -->
{ { rule({ name: "rule-name", deprecated: true, // or removed: true replacedBy:
"name-of-replacement-rule" description: 'Example: Enforce `return` statements in
getters.', categories: { recommended: true, fixable: true, hasSuggestions: false
} }) } }
{% from 'components/rule.macro.html' import rule %}
{{ rule({ name: "array-bracket-newline", deprecated: true, description: 'Enforces line breaks after opening and before closing array brackets.', categories: { recommended: true, fixable: true, hasSuggestions: false } }) }}
{{ rule({ name: "no-arrow-condition", removed: true, description: 'Disallows arrow functions where test conditions are expected.', replacedBy: ["no-confusing-arrow", "no-constant-condition"], categories: { recommended: false, fixable: false, hasSuggestions: false } }) }}
{{ rule({
name: "getter-return",
deprecated: false,
description: 'Enforce return statements in getters.',
categories: {
recommended: true,
fixable: false,
hasSuggestions: false
}
}) }}