forked from jsx-eslint/eslint-plugin-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[New] add
no-invalid-html-attribute
rule
Co-authored-by: Sebastian Malton <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
- Loading branch information
Showing
6 changed files
with
1,648 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Prevent usage of invalid attributes (react/no-invalid-html-attribute) | ||
|
||
Some HTML elements have a specific set of valid values for some attributes. | ||
For instance the elements: `a`, `area`, `link`, or `form` all have an attribute called `rel`. | ||
There is a fixed list of values that have any meaning for this attribute on these tags (see [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel)). | ||
To help with minimizing confusion while reading code, only the appropriate values should be on each attribute. | ||
|
||
## Rule Details | ||
|
||
This rule aims to remove invalid attribute values. | ||
|
||
## Rule Options | ||
The options is a list of attributes to check. Defaults to `["rel"]`. | ||
|
||
## When Not To Use It | ||
|
||
When you don't want to enforce attribute value correctness. |
This file contains 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
Oops, something went wrong.