You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/no-unknown-property.md
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@
4
4
5
5
🔧 This rule is automatically fixable using the `--fix`[flag](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) on the command line.
6
6
7
-
In JSX all DOM properties and attributes should be camelCased to be consistent with standard JavaScript style. This can be a possible source of error if you are used to writing plain HTML.
7
+
In JSX most DOM properties and attributes should be camelCased to be consistent with standard JavaScript style. This can be a possible source of error if you are used to writing plain HTML.
8
+
Only `data-*` and `aria-*` attributes are usings hyphens and lowercase letters in JSX.
8
9
9
10
## Rule Details
10
11
@@ -22,6 +23,14 @@ Examples of **correct** code for this rule:
22
23
var React =require('react');
23
24
24
25
var Hello =<div className="hello">Hello World</div>;
26
+
27
+
// aria-* attributes
28
+
var IconButton =<button aria-label="Close" onClick={this.close}>{closeIcon}</button>;
0 commit comments