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

Recommended approach for separating ESLint and eslint-plugin-jsx-a11y configurations #1036

Open
chillkang opened this issue Nov 11, 2024 · 1 comment

Comments

@chillkang
Copy link

Description:
I recently integrated the eslint-plugin-jsx-a11y linter into our codebase to help identify and resolve accessibility issues. My goal is to maintain a clear separation between the general JavaScript/TypeScript linting and the accessibility-specific linting, so that I can view the two sets of errors separately.

The Issue:
To keep accessibility errors separate from general linting errors, I created an additional configuration file, eslint-a11y.config.js, alongside our existing .eslintrc.js. For example, I can now run lint-js and lint-a11y scripts separately and view general lint and accessibility errors independently. However, when running both configurations, I noticed overlapping errors, so I disabled non-accessibility-related rules in eslint-a11y.config.js to ensure it only reports accessibility issues.

Question:
Is this approach considered best practice, or would it be preferable to consolidate both configurations into a single .eslintrc.js file with eslint-plugin-jsx-a11y included in the plugin section? I would appreciate any guidance on managing multiple ESLint configurations or recommendations on maintaining this setup effectively. Thanks!

@ljharb
Copy link
Member

ljharb commented Nov 11, 2024

I don't understand why you'd want to keep them separate - errors are errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants