mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
[eprh] fix react-compiler rules missing meta.docs.url property (#35258)
## Summary To help people access the documentation easier, we can [add `meta.docs.url`](https://eslint.org/docs/latest/extend/custom-rules#:~:text=Specifies%20the%20URL) to the new react-compiler rules. This allows IDEs to make the rule name a clickable link. ## How did you test this change? `yarn test`, `yarn prettier`, `yarn lint` and in a separate project [using file:// URLs](https://stackoverflow.com/a/38417065)
This commit is contained in:
@@ -151,6 +151,7 @@ function makeRule(rule: LintRule): Rule.RuleModule {
|
||||
docs: {
|
||||
description: rule.description,
|
||||
recommended: rule.preset === LintRulePreset.Recommended,
|
||||
url: `https://react.dev/reference/eslint-plugin-react-hooks/lints/${rule.name}`,
|
||||
},
|
||||
fixable: 'code',
|
||||
hasSuggestions: true,
|
||||
|
||||
Reference in New Issue
Block a user