Skip to content

Commit

Permalink
feat(linter/react): add the rules_of_hooks rule. (#3071)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa committed May 12, 2024
1 parent 8519a0a commit 1f135ce
Show file tree
Hide file tree
Showing 5 changed files with 2,102 additions and 12 deletions.
2 changes: 2 additions & 0 deletions crates/oxc_linter/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ mod react {
pub mod no_unknown_property;
pub mod react_in_jsx_scope;
pub mod require_render_return;
pub mod rules_of_hooks;
pub mod void_dom_elements_no_children;
}

Expand Down Expand Up @@ -639,6 +640,7 @@ oxc_macros::declare_all_lint_rules! {
react::no_is_mounted,
react::no_unknown_property,
react::require_render_return,
react::rules_of_hooks,
react::void_dom_elements_no_children,
react_perf::jsx_no_jsx_as_prop,
react_perf::jsx_no_new_array_as_prop,
Expand Down

0 comments on commit 1f135ce

Please sign in to comment.