You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both react-hooks/exhaustive-deps from eslint-plugin-react-hooks and lint/correctness/useExhaustiveDependencies from biome emit a warning:
react-hooks/exhaustive-deps:
/home/berni/Documents/src/test/linters/src/index.js
9:8 warning React Hook useEffect has a missing dependency: 'log'. Either include it or remove the dependency array react-hooks/exhaustive-deps
✖ 1 problem (0 errors, 1 warning)
lint/correctness/useExhaustiveDependencies:
./src/index.js:7:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ This hook does not specify all of its dependencies: log
5 │ console.log(foo);
6 │ }, [foo]);
> 7 │ useEffect(() => {
│ ^^^^^^^^^
8 │ log();
9 │ }, []);
ℹ This dependency is not specified in the hook dependency list.
6 │ }, [foo]);
7 │ useEffect(() => {
> 8 │ log();
│ ^^^
9 │ }, []);
10 │ }
ℹ Either include it or remove the dependency array
Checked 1 file in 1396µs. No fixes applied.
Found 1 error.
lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Some errors were emitted while running checks.
The text was updated successfully, but these errors were encountered:
What version of Oxlint are you using?
0.15.15
What command did you run?
oxlint ./src
What does your
.oxlintrc.json
config file look like?What happened?
For this code:
no warning is emitted.
Both
react-hooks/exhaustive-deps
fromeslint-plugin-react-hooks
andlint/correctness/useExhaustiveDependencies
frombiome
emit a warning:react-hooks/exhaustive-deps
:lint/correctness/useExhaustiveDependencies
:The text was updated successfully, but these errors were encountered: