Skip to content

Commit b0d22e3

Browse files
authored
Docs: Mention benefit of providing meta.docs.url (#14774)
Perhaps the top benefit of rules providing the `meta.docs.url` property with a link to their documentation is that IDEs / code editors can then provide a helpful link on rule violations. Developers often find this link useful to better understand a violation and learn how to fix it. However, many rule authors are unaware of this feature and thus exclude the property because they don't see the value of it. Mentioning this feature in ESLint's rule documentation should help encourage greater adoption of this property. Note that there is also a lint rule to require and autofix this property: https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/docs/rules/require-meta-docs-url.md
1 parent 000cc79 commit b0d22e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/developer-guide/working-with-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The source file for a rule exports an object with the following properties.
6161
* `description` (string) provides the short description of the rule in the [rules index](../rules/)
6262
* `category` (string) specifies the heading under which the rule is listed in the [rules index](../rules/)
6363
* `recommended` (boolean) is whether the `"extends": "eslint:recommended"` property in a [configuration file](../user-guide/configuring/configuration-files.md#extending-configuration-files) enables the rule
64-
* `url` (string) specifies the URL at which the full documentation can be accessed
64+
* `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)
6565
* `suggestion` (boolean) specifies whether rules can return suggestions (defaults to false if omitted)
6666

6767
In a custom rule or plugin, you can omit `docs` or include any properties that you need in it.

0 commit comments

Comments
 (0)