Skip to content

Commit

Permalink
docs: improve documentation of rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Sep 19, 2024
1 parent 6922305 commit bf7682e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ use schemars::JsonSchema;
declare_lint_rule! {
/// Enforce all dependencies are correctly specified in a React hook.
///
/// _This rule should be used only in **React** projects._
///
/// This rule is a port of the rule [react-hooks/exhaustive-deps](https://legacy.reactjs.org/docs/hooks-rules.html#eslint-plugin), and it's meant to target projects that uses React.
///
/// If your project _doesn't_ use React (or Preact), **you shouldn't use this rule**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ use schemars::JsonSchema;
declare_lint_rule! {
/// Enforce that all React hooks are being called from the Top Level component functions.
///
/// _This rule should be used only in **React** projects._
///
/// To understand why this required see https://reactjs.org/docs/hooks-rules.html#only-call-hooks-at-the-top-level
///
/// ## Examples
Expand Down

0 comments on commit bf7682e

Please sign in to comment.