feat(linter): RulesOfHooks from nursery to correctness (#7607)

This commit is contained in:
Boshen 2024-12-03 14:15:43 +00:00
parent bd977cf742
commit 4eb87eadbf

View file

@ -104,7 +104,7 @@ declare_oxc_lint!(
/// <https://reactjs.org/docs/hooks-rules.html> /// <https://reactjs.org/docs/hooks-rules.html>
/// ///
RulesOfHooks, RulesOfHooks,
nursery correctness
); );
impl Rule for RulesOfHooks { impl Rule for RulesOfHooks {
@ -1228,7 +1228,7 @@ fn test() {
if (a) return; if (a) return;
useHook2(); useHook2();
} while (b); } while (b);
do { do {
useHook3(); useHook3();
if (c) return; if (c) return;