dillon1000/react

Commit

feat(eslint-plugin-react-hooks): make flat config the `recommended` config (#32457)

This change swaps which config `recommended` is aliasing. In 5.2.0, the
new flat config was introduced as `recommended-latest`, while
`recommended` still pointed at the legacy rc-based config, with a note
that in the next major version `recommended` would be updated to point
at `recommend-latest`. This change makes that swap, and make the default
`recommended` experience the flat config. To continue using the legacy
rc recommended config, please make the following change in your config

```diff
- extends: ['plugin:react-hooks/recommended']
+ extends: ['plugin:react-hooks/recommended-legacy']
```

This change also deprecates `recommended-latest` in favor of
`recommended`. `recommended-latest` will be removed in a future major
version.

The README has been updated to reflect the new usage, and to put the
flat config sections before the legacy config sections.

I also took the opportunity to change the v9 fixture to use a typescript
config, serving as a demonstration for usage as well as a way to
validate the types are correct.

BREAKING CHANGE

---------

Co-authored-by: lauren <[email protected]>
Browse files
Changed paths6 files
First-parent comparison
R fixtures/eslint-v9/eslint.config.mjs →fixtures/eslint-v9/eslint.config.ts RenamedM fixtures/eslint-v9/package.json ModifiedA fixtures/eslint-v9/tsconfig.json AddedM fixtures/eslint-v9/yarn.lock ModifiedM packages/eslint-plugin-react-hooks/README.md ModifiedM packages/eslint-plugin-react-hooks/src/index.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…