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
[compiler] Adjustments to exhaustive deps messages, disable the lint rule (#35192)
Similar to ValidateHookUsage, we implement this check in the compiler
for safety but (for now) continue to rely on the existing rule for
actually reporting errors to users.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35192).
* #35201
* #35202
* __->__ #35192
DiffTrain build for [9599e7a](9599e7a)
Copy file name to clipboardExpand all lines: compiled/eslint-plugin-react-hooks/index.js
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -18353,7 +18353,7 @@ function getRuleForCategoryImpl(category) {
18353
18353
severity: ErrorSeverity.Error,
18354
18354
name: 'memo-dependencies',
18355
18355
description: 'Validates that useMemo() and useCallback() specify comprehensive dependencies without extraneous values. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.',
18356
-
preset: LintRulePreset.RecommendedLatest,
18356
+
preset: LintRulePreset.Off,
18357
18357
};
18358
18358
}
18359
18359
case ErrorCategory.IncompatibleLibrary: {
@@ -53621,7 +53621,7 @@ function validateExhaustiveDependencies(fn) {
53621
53621
if (missing.length !== 0) {
53622
53622
const diagnostic = CompilerDiagnostic.create({
53623
53623
category: ErrorCategory.MemoDependencies,
53624
-
reason: 'Found non-exhaustive dependencies',
53624
+
reason: 'Found missing memoization dependencies',
53625
53625
description: 'Missing dependencies can cause a value not to update when those inputs change, ' +
53626
53626
'resulting in stale UI',
53627
53627
suggestions,
@@ -53645,7 +53645,7 @@ function validateExhaustiveDependencies(fn) {
0 commit comments