Skip to content

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

Open
@chillkang

Description

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!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions