Skip to content

Commit 7fcf0e3

Browse files
committed
feat(config): reenable jsx-a11y label rules
BREAKING CHANGE: we’ve re-enabled label-related rules from jsx-a11y. They seem to be more reliable than they have been in the past.
1 parent 96f2214 commit 7fcf0e3

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

src/__snapshots__/base.test.js.snap

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ Object {
4444
"optionalDependencies": false,
4545
},
4646
],
47-
"jsx-a11y/label-has-associated-control": Array [
48-
0,
49-
],
50-
"jsx-a11y/label-has-for": Array [
51-
0,
52-
],
5347
"no-param-reassign": Array [
5448
2,
5549
Object {

src/__snapshots__/semver.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ Object {
354354
"error",
355355
],
356356
"@thibaudcolas/cookbook/jsx-a11y/label-has-associated-control": Array [
357-
0,
357+
"error",
358358
Object {
359359
"assert": "both",
360360
"controlComponents": Array [],
@@ -364,7 +364,7 @@ Object {
364364
},
365365
],
366366
"@thibaudcolas/cookbook/jsx-a11y/label-has-for": Array [
367-
0,
367+
"off",
368368
Object {
369369
"allowChildren": false,
370370
"components": Array [],

src/base.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ const REACT = {
4343
};
4444

4545
const LEGACY = {
46-
// Does not work at the moment for nested fields.
47-
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
48-
"jsx-a11y/label-has-for": [0],
49-
"jsx-a11y/label-has-associated-control": [0],
5046
// Do not enforce reassignment to properties of object parameters.
5147
"no-param-reassign": [2, { props: false }],
5248
// Only forbid "any" proptype, no other.

0 commit comments

Comments
 (0)