-
Notifications
You must be signed in to change notification settings - Fork 49.6k
feat(eslint-plugin-react-hooks): make flat config the recommended config
#32457
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
feat(eslint-plugin-react-hooks): make flat config the recommended config
#32457
Conversation
…onfig 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. BREAKING CHANGE
This change updates the README to prioritize flat config and updates the usage examples to reflect the change in recommended configs.
This change updates the eslint-v9 fixture to use a typescript config
|
Comparing: d55cc79...885e163 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
| "eslint-plugin-react-hooks": "link:../../build/oss-stable/eslint-plugin-react-hooks" | ||
| "eslint": "^9.18.0", | ||
| "eslint-plugin-react-hooks": "link:../../build/oss-stable/eslint-plugin-react-hooks", | ||
| "jiti": "^2.4.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jiti is what eslint uses for parsing ts configs. https://eslint.org/docs/latest/use/configure/configuration-files#typescript-configuration-files
…onfig (#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> DiffTrain build for [ca12911](ca12911)
This change swaps which config
recommendedis aliasing. In 5.2.0, the new flat config was introduced asrecommended-latest, whilerecommendedstill pointed at the legacy rc-based config, with a note that in the next major versionrecommendedwould be updated to point atrecommend-latest. This change makes that swap, and make the defaultrecommendedexperience the flat config. To continue using the legacy rc recommended config, please make the following change in your configThis change also deprecates
recommended-latestin favor ofrecommended.recommended-latestwill 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