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: README.md
+8
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,9 @@ Add `plugin:jsx-a11y/recommended` or `plugin:jsx-a11y/strict` in `extends`:
104
104
"CustomButton": "button",
105
105
"MyButton": "button",
106
106
"RoundButton": "button"
107
+
},
108
+
"attributes": {
109
+
"for": ["htmlFor", "for"]
107
110
}
108
111
}
109
112
}
@@ -202,6 +205,11 @@ module.exports = [
202
205
203
206
To enable your custom components to be checked as DOM elements, you can set global settings in your configuration file by mapping each custom component name to a DOM element type.
204
207
208
+
#### Attribute Mapping
209
+
210
+
To configure the JSX property to use for attribute checking, you can set global settings in your configuration file by mapping each DOM attribute to the JSX property you want to check.
211
+
For example, you may want to allow the `for` attribute in addition to the `htmlFor` attribute for checking label associations.
212
+
205
213
#### Polymorphic Components
206
214
207
215
You can optionally use the `polymorphicPropName` setting to define the prop your code uses to create polymorphic components.
0 commit comments