Bump eslint-plugin-react-hooks from 4.6.2 to 7.0.1
Type: Pull Request
State: Closed
Association: Unknown
Comments: 1
(5 months ago)
(about 1 month ago)
(about 1 month ago)
dependencies javascript
Bumps eslint-plugin-react-hooks from 4.6.2 to 7.0.1.
Release notes
Sourced from eslint-plugin-react-hooks's releases.
eslint-plugin-react-hooks@5.0.0 (Oct 11, 2024)
This release only contains
eslint-plugin-react-hooks. Notably, new violations and support for ESLint v9 were added.
eslint-plugin-react-hooks
- New Violations: Component names now need to start with an uppercase letter instead of a non-lowercase letter. This means
_Buttonor_componentare no longer valid. (@kassens) in #25162 For example, infunction _Component() { useState() ^^^^^^^^ A React Hook "useState" is called in function "_Component" which is neither a Component nor a custom React Hook function. }_Componentshould be renamed toComponent.
- Add support for ESLint v9. (
@eps1lonin #28773)- Consider dispatch from
useActionStatestable. (@eps1lonin #29665)- Accept
asexpression in callback. (@StyleShitin #28202)- Accept
asexpressions in deps array. (@StyleShitin #28189)- Treat
React.use()the same asuse(). (@kassensin #27769)- Move
use()lint to non-experimental. (@kassensin #27768)- Support Flow
asexpressions. (@cpojerin #27590)- Allow
useEffect(fn, undefined). (@kassensin #27525)- Disallow hooks in async functions. (
@acdlitein #27045)- Rename experimental
useEventtouseEffectEvent. (@sebmarkbagein #25881)- Lint for presence of
useEventfunctions in dependency lists. (@potetoin #25512)- Check
useEventreferences instead. (@potetoin #25319)- Update
RulesOfHookswithuseEventrules. (@potetoin #25285)
Changelog
Sourced from eslint-plugin-react-hooks's changelog.
7.0.1
- Disallowed passing inline
useEffectEventvalues as JSX props to guard against accidental propagation. (#34820 by@jf-eirinha)- Switch to
export =so eslint-plugin-react-hooks emits correct types for consumers in Node16 ESM projects. (#34949 by@karlhorky)- Tightened the typing of
configs.flatso theconfigsexport is always defined. (#34950 by@poteto)- Fix named import runtime errors. (#34951, #34953 by
@karlhorky)7.0.0
This release slims down presets to just 2 configurations (
recommendedandrecommended-latest), and all compiler rules are enabled by default.
- Breaking: Removed
recommended-latest-legacyandflat/recommendedconfigs. The plugin now providesrecommended(legacy and flat configs with all recommended rules), andrecommended-latest(legacy and flat configs with all recommended rules plus new bleeding edge experimental compiler rules). (@potetoin #34757)6.1.1
Note: 6.1.0 accidentally allowed use of
recommendedwithout flat config, causing errors when used with ESLint v9'sdefineConfig()helper. This has been fixed in 6.1.1.
- Fix
recommendedconfig for flat config compatibility. Therecommendedconfig has been converted to flat config format. Non-flat config users should userecommended-legacyinstead. (@potetoin #34700)- Add
recommended-latestandrecommended-latest-legacyconfigs that include React Compiler rules. (@potetoin #34675)- Remove unused
NoUnusedOptOutDirectivesrule. (@potetoin #34703)- Remove
hermes-parserand dependency. (@potetoin #34719)- Remove
@babel/plugin-proposal-private-methodsdependency. (@ArnaudBarreand@josephsavonain #34715)- Update for Zod v3/v4 compatibility. (
@kolianand@josephsavonain #34717)6.1.0
Note: Version 6.0.0 was mistakenly released and immediately deprecated and untagged on npm. This is the first official 6.x major release and includes breaking changes.
- Breaking: Require Node.js 18 or newer. (
@michaelfaithin #32458)- Breaking: Flat config is now the default
recommendedpreset. Legacy config moved torecommended-legacy. (@michaelfaithin #32457)- New Violations: Disallow calling
usewithin try/catch blocks. (@potetoin #34040)- New Violations: Disallow calling
useEffectEventfunctions in arbitrary closures. (@jbrown215in #33544)- Handle
React.useEffectin addition touseEffectin rules-of-hooks. (@Ayc0in #34076)- Added
react-hookssettings config option that to acceptadditionalEffectHooksthat are used across exhaustive-deps and rules-of-hooks rules. (@jbrown215) in #344976.0.0
Accidentally released. See 6.1.0 for the actual changes.
5.2.0
- Support flat config (
@michaelfaithin #30774)- Convert the plugin to TypeScript and provide package type declarations (
@michaelfaithin #32279, #32283, #32240, #32400 and@potetoin #32420)- Fix false positive error in components with
do/whileloops (@tyxlain #31720)- Detect issues in class properties (
@mjesun&@ecraig12345in #31823)5.1.0
- Add support for
do/whileloops (@tyxlain #28714)- Fix error when callback argument is an identifier with an
asexpression (@mskeltonin #31119)
... (truncated)
Commits
- See full diff in compare view
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Package Dependencies
Technical Details
| ID: | 15815359 |
| UUID: | 3866606139 |
| Node ID: | PR_kwDOM4_Omc6_6qs5 |
| Host: | GitHub |
| Repository: | CommandCodeAI/BaseAI |