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 <poteto@users.noreply.github.com>
Showing
- fixtures/eslint-v9/eslint.config.ts 3 additions, 2 deletionsfixtures/eslint-v9/eslint.config.ts
- fixtures/eslint-v9/package.json 3 additions, 2 deletionsfixtures/eslint-v9/package.json
- fixtures/eslint-v9/tsconfig.json 2 additions, 0 deletionsfixtures/eslint-v9/tsconfig.json
- fixtures/eslint-v9/yarn.lock 37 additions, 39 deletionsfixtures/eslint-v9/yarn.lock
- packages/eslint-plugin-react-hooks/README.md 29 additions, 30 deletionspackages/eslint-plugin-react-hooks/README.md
- packages/eslint-plugin-react-hooks/src/index.ts 17 additions, 18 deletionspackages/eslint-plugin-react-hooks/src/index.ts