[eslint-plugin-react-hooks] Added meta property (including docs)#16607
Merged
gaearon merged 3 commits intofacebook:masterfrom Apr 1, 2020
Merged
[eslint-plugin-react-hooks] Added meta property (including docs)#16607gaearon merged 3 commits intofacebook:masterfrom
gaearon merged 3 commits intofacebook:masterfrom
Conversation
Details of bundled changes.Comparing: 996acf9...418f4ee eslint-plugin-react-hooks
Generated by 🚫 dangerJS |
jadamsss
approved these changes
Nov 19, 2019
jadamsss
left a comment
There was a problem hiding this comment.
Looks great! Hopefully this can get merged in.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution. |
418f4ee to
292d2a1
Compare
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9d2320c:
|
Details of bundled changes.Comparing: 3e94bce...9d2320c eslint-plugin-react-hooks
Size changes (experimental) |
Details of bundled changes.Comparing: 3e94bce...9d2320c eslint-plugin-react-hooks
Size changes (stable) |
Contributor
Author
|
It has been a long time since this was submitted. Can someone look at it? I believe it will help users understand the eslint rules better. |
Collaborator
|
Thanks! |
This was referenced Mar 15, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ESLint v4.15.0 added an official location for rules to store metadata such as a URL to their documentation (see eslint/eslint#9788). This adds the URL to all the existing rules so anything consuming them can know where their documentation is without having to resort to external packages to guess. Plugins such as this one can also help the ESLint ecosystem benefit from the same information by adding the
typeanddocsproperties to themetaobject in their rule definitions.In order to allow my vscode extension lintlens to direct users to the right documentation, this PR adds/updates the meta property (in accordance with ESLint's Rule Basics) to each of the rules in the
eslint-plugin-react-hookspackage.I tried my best to determine the correct values for
type,docs.description,docs.category, anddocs.url. Usually, plugins would place a markdown file under/docs/rules(EX: ESLint Rules) for each rule and use that as the url property value. I did not include such documentation myself. Rather, I pointed to existing documentation for each rule: