Skip to content

Commit 1e0a696

Browse files
committed
[eslint config] [breaking] disable label-has-for; enable control-has-associated-label
1 parent 73f71d9 commit 1e0a696

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/eslint-config-airbnb/rules/react-a11y.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ module.exports = {
4848

4949
// require that JSX labels use "htmlFor"
5050
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
51-
'jsx-a11y/label-has-for': ['error', {
51+
// deprecated: replaced by `label-has-associated-control` rule
52+
'jsx-a11y/label-has-for': ['off', {
5253
components: [],
5354
required: {
5455
every: ['nesting', 'id'],
@@ -68,8 +69,7 @@ module.exports = {
6869

6970
// Enforce that a control (an interactive element) has a text label.
7071
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md
71-
// TODO, semver-major: enable
72-
'jsx-a11y/control-has-associated-label': ['off', {
72+
'jsx-a11y/control-has-associated-label': ['error', {
7373
labelAttributes: ['label'],
7474
controlComponents: [],
7575
ignoreElements: [

0 commit comments

Comments
 (0)