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.
Problem
eslint-plugin-github’s flat React config (lib/configs/flat/react.js) currently spreadsjsxA11yPlugin.flatConfigs.recommendedand then defines its ownrulesobject in the same config object.Because JavaScript object spread is shallow, this pattern causes the later
ruleskey to replace therulesfromjsxA11yPlugin.flatConfigs.recommendedinstead of merging with it.That unintentionally drops most of the
jsx-a11yrecommended rule set. In practice, only the explicitly listed rules ineslint-plugin-githubremain active, so expectedjsx-a11yrules 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:
Why this works
jsx-a11yrecommended rules enabled by default.Scope of change
Apply the fix in:
lib/configs/flat/react.jsNo behavior outside this config needs to change.