diff --git a/crates/oxc_linter/src/rules/react/rules_of_hooks.rs b/crates/oxc_linter/src/rules/react/rules_of_hooks.rs index e7f23620c..0e5c33111 100644 --- a/crates/oxc_linter/src/rules/react/rules_of_hooks.rs +++ b/crates/oxc_linter/src/rules/react/rules_of_hooks.rs @@ -102,7 +102,7 @@ declare_oxc_lint!( /// /// RulesOfHooks, - correctness + nursery ); impl Rule for RulesOfHooks { @@ -846,7 +846,7 @@ fn test() { // This *must* be invalid. " function useHook() { - if (a) return; + if (a) return; useState(); } ", diff --git a/crates/oxc_linter/src/snapshots/rules_of_hooks.snap b/crates/oxc_linter/src/snapshots/rules_of_hooks.snap index 25b1466f9..f7baebf1d 100644 --- a/crates/oxc_linter/src/snapshots/rules_of_hooks.snap +++ b/crates/oxc_linter/src/snapshots/rules_of_hooks.snap @@ -4,7 +4,7 @@ expression: rules_of_hooks --- × eslint-plugin-react-hooks(rules-of-hooks): React Hook "useState" is called conditionally. React Hooks must be called in the exact same order in every component render. ╭─[rules_of_hooks.tsx:4:15] - 3 │ if (a) return; + 3 │ if (a) return; 4 │ useState(); · ────────── 5 │ }