Skip to content

Commit 857e242

Browse files
authored
docs: tweak explanation for meta.docs rule properties (#18057)
1 parent 10485e8 commit 857e242

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/extend/custom-rules.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ The source file for a rule exports an object with the following properties. Both
4444
* `"suggestion"`: The rule is identifying something that could be done in a better way but no errors will occur if the code isn't changed.
4545
* `"layout"`: The rule cares primarily about whitespace, semicolons, commas, and parentheses, all the parts of the program that determine how the code looks rather than how it executes. These rules work on parts of the code that aren't specified in the AST.
4646

47-
* `docs`: (`object`) Required for core rules and optional for custom rules. Core rules have specific entries inside of `docs` while custom rules can include any properties that you need. The following properties are only relevant when working on core rules.
47+
* `docs`: (`object`) Properties often used for documentation generation and tooling. Required for core rules and optional for custom rules. Custom rules can include additional properties here as needed.
4848

49-
* `description`: (`string`) Provides the short description of the rule in the [rules index](../rules/).
50-
* `recommended`: (`boolean`) Specifies whether the rule is enabled by the `recommended` config from `@eslint/js`.
51-
* `url`: (`string`) Specifies the URL at which the full documentation can be accessed (enabling code editors to provide a helpful link on highlighted rule violations).
49+
* `description`: (`string`) Provides a short description of the rule. For core rules, this is used in [rules index](../rules/).
50+
* `recommended`: (`boolean`) For core rules, this specifies whether the rule is enabled by the `recommended` config from `@eslint/js`.
51+
* `url`: (`string`) Specifies the URL at which the full documentation can be accessed. Code editors often use this to provide a helpful link on highlighted rule violations.
5252

5353
* `fixable`: (`string`) Either `"code"` or `"whitespace"` if the `--fix` option on the [command line](../use/command-line-interface#--fix) automatically fixes problems reported by the rule.
5454

0 commit comments

Comments
 (0)