-
-
Notifications
You must be signed in to change notification settings - Fork 640
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
How to configure eslint-plugin-jsx-a11y
in eslint.config.js
#965
Comments
That's because this plugin doesn't support flat config yet, so it's correct to not be in the documentation. See #891. |
I also spent some time looking through PR issues that mention "flat config" to finally find this one. I think it might be valuable to add a note to the readme that says it's currently not supported but coming soon? |
@vmerino then i'd get no end to issues asking "when" :-p |
@ljharb So I was able to make the plugin work with the following config object in the flat config with import jsxA11y from 'eslint-plugin-jsx-a11y';
// ...
{
plugins: {
'jsx-a11y': {
rules: jsxA11y.rules,
},
},
rules: jsxA11y.configs.recommended.rules,
}, It may also need the If you don't want to make any changes to the code itself, could just put the above snippet in the readme? |
@gregjacobs if you can confirm that all of the rules actually work that way, then I'd be happy to accept a PR with a |
From the next version 9, ESLint will deprecate the current eslintrc format, and by default will use the new flat config format (
eslint.config.js
). Already from version 8.2.23 you can fully use the flat config format. But your README (which is used as a description for the NPM package) doesn’t say anything about how to configure it correctly. Although the READMEeslint-plugin-react
contains this information. Please add this information to the documentation.The text was updated successfully, but these errors were encountered: