Skip to content

[pull] main from jsx-eslint:main #2

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Nov 16, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

azat-io and others added 2 commits November 9, 2024 13:18
The previous use of spread meant that
```ts
import jsxA11y from 'eslint-plugin-jsx-a11y';

jsxA11y !== jsxA11y.flatConfigs.recommended.plugins['jsx-a11y']
```

This is a problem because if someone does something like this
```js
import jsxA11y from 'eslint-plugin-jsx-a11y';

export default [
  { plugins: { 'jsx-a11y': jsxA11y } },
  jsxA11y.flatConfigs.recommended,
];
```
then ESLint will crash with the error `Config "jsx-a11y/recommended": Key "plugins": Cannot redefine plugin "jsx-a11y".`

This PR fixes that by using `Object.assign` to mutate the `jsxA11y` object and maintain referential equality.
@pull pull bot added the ⤵️ pull label Nov 16, 2024
ljharb and others added 7 commits November 17, 2024 09:51
This change updates the error messages of the label-has-associated-control rule so that each assert type gets an error message with verbiage specific to the assertion.

I wanted to land this before adding support for matching a label's htmlFor attribute with the associated control's id
This change adjusts the error condition for `no-autofocus` to allow for manually disabling `autoFocus`.  Now, any usage of `autoFocus="false"` or `autoFocus={false}` will not report.
…, `@babel/plugin-transform-flow-strip-types`, `@babel/register`, `jscodeshift`, `object.assign`, `object.entries`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants