Skip to content

jsxA11yPlugin recommended rules are disabled due to flat config changes after 6.x versions #714

Description

@alaingoga

Problem

eslint-plugin-github’s flat React config (lib/configs/flat/react.js) currently spreads jsxA11yPlugin.flatConfigs.recommended and then defines its own rules object in the same config object.

Because JavaScript object spread is shallow, this pattern causes the later rules key to replace the rules from jsxA11yPlugin.flatConfigs.recommended instead of merging with it.

That unintentionally drops most of the jsx-a11y recommended rule set. In practice, only the explicitly listed rules in eslint-plugin-github remain active, so expected jsx-a11y rules are not enforced for consumers.

Proposed solution

Use explicit rule merging in the same object, so the recommended baseline is preserved and GitHub-specific overrides still apply:

rules: {
  ...jsxA11yPlugin.flatConfigs.recommended.rules,
  // existing github/jsx-a11y overrides
}

Why this works

  • Keeps all jsx-a11y recommended rules enabled by default.
  • Preserves intentional project-specific overrides by placing them after the spread.
  • Avoids larger config restructuring while fixing the behavior immediately.

Scope of change

Apply the fix in:

  • lib/configs/flat/react.js

No behavior outside this config needs to change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions