mirror of
https://github.com/danbulant/oxc
synced 2026-05-21 05:08:45 +00:00
feat(linter): RulesOfHooks from nursery to correctness (#7607)
This commit is contained in:
parent
bd977cf742
commit
4eb87eadbf
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue