Skip to content

Commit ca19c10

Browse files
authored
Change some form handling rules
jsx-a11y/label-has-for is deprecated in future versions of eslint so we should disable it now in favor of label-as-associated control https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md fs-styles currently does not support nesting, so the default `assert` setting of both is too strict. Switching to `either` allows either nesting or using a `for` or `htmlFor` parameter. Until we move off of fs-styles this will prevent many spurious linting issues. https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-associated-control.md
1 parent f90655c commit ca19c10

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

es6.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ module.exports = {
3131

3232
'jest/no-large-snapshots': 'error',
3333

34-
'import/no-extraneous-dependencies': ['error', {devDependencies: ['**/*.stories.js', '**/*.test.js']}]
34+
'import/no-extraneous-dependencies': ['error', {devDependencies: ['**/*.stories.js', '**/*.test.js']}],
35+
"jsx-a11y/label-has-for": 0, // this is deprecated in future versions so disable now
36+
"jsx-a11y/label-has-associated-control": [ 2, {
37+
"assert": "either", // fs-styles does not support nesting currently
38+
}],
3539
},
3640
}

0 commit comments

Comments
 (0)