Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Update eslint-plugin-jsx-a11y #44701

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
*/

const path = require('path');
const a11yBase = require('eslint-config-airbnb/rules/react-a11y');

const controlHasAssociatedLabelConfig = a11yBase.rules['jsx-a11y/control-has-associated-label'];

const controlHasAssociatedLabelOptions =
typeof controlHasAssociatedLabelConfig[1] === 'object' ? controlHasAssociatedLabelConfig[1] : {};

const OneLevelImportMessage = [
'Prefer one level nested imports to avoid bundling everything in dev mode or breaking CJS/ESM split.',
Expand Down Expand Up @@ -158,6 +164,14 @@ module.exports = /** @type {Config} */ ({
],
// We are a library, we need to support it too
'jsx-a11y/no-autofocus': 'off',
// Remove when https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/959 gets fixed
ZeeshanTamboli marked this conversation as resolved.
Show resolved Hide resolved
'jsx-a11y/control-has-associated-label': [
'error',
{
...controlHasAssociatedLabelOptions,
ignoreElements: [...(controlHasAssociatedLabelOptions.ignoreElements || []), 'th', 'td'],
},
],

'material-ui/docgen-ignore-before-comment': 'error',
'material-ui/rules-of-use-theme-variants': 'error',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-material-ui": "workspace:^",
"eslint-plugin-mocha": "^10.5.0",
"eslint-plugin-react": "^7.37.2",
Expand Down
99 changes: 54 additions & 45 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading