Skip to content

Commit

Permalink
feat(linter/react): add the rules_of_hooks rule.
Browse files Browse the repository at this point in the history
This one sounds like something straight out of `Mortal Kombat`!
  • Loading branch information
rzvxa committed May 10, 2024
1 parent 20f6430 commit beb07b8
Show file tree
Hide file tree
Showing 5 changed files with 2,135 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 @@ -208,6 +208,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 @@ -635,6 +636,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 beb07b8

Please sign in to comment.