Skip to content

Commit

Permalink
feat: useExhaustiveDependencies not recommended (#4294)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Oct 23, 2024
1 parent 98a0840 commit 270cf3c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
cli: major
---

# The rule `useExhaustiveDependencies` isn't recommended anymore

The rule `useExhaustiveDependencies` is not recommended anymore. If your codebase uses `react` and relies on that rule, you have to enable it:


```jsonc
// biome.json
{
"linter": {
"rules": {
"correctness": {
"useExhaustiveDependencies": "error"
}
}
}
}
```
2 changes: 0 additions & 2 deletions crates/biome_configuration/src/analyzer/linter/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2354,7 +2354,6 @@ impl Correctness {
"noUnusedLabels",
"noVoidElementsWithChildren",
"noVoidTypeReturn",
"useExhaustiveDependencies",
"useIsNan",
"useJsxKeyInIterable",
"useValidForDirection",
Expand Down Expand Up @@ -2396,7 +2395,6 @@ impl Correctness {
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[43]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[44]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[46]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[49]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[50]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[51]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ declare_lint_rule! {
name: "useExhaustiveDependencies",
language: "jsx",
sources: &[RuleSource::EslintReactHooks("exhaustive-deps")],
recommended: true,
recommended: false,
}
}

Expand Down

0 comments on commit 270cf3c

Please sign in to comment.