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
fix(eslint-plugin-react-hooks): accepting as expressions as deps array (#28189)
## Summary
This PR closes#25844
The original issue talks about `as const`, but seems like it fails for
any `as X` expressions since it adds another nesting level to the AST.
EDIT: Also closes#20162
## How did you test this change?
Added unit tests
DiffTrain build for [a1433ca](a1433ca)
// If the declared dependencies are not an array expression then we
1396
1398
// can't verify that the user provided the correct dependencies. Tell
1397
1399
// the user this in an error.
@@ -1400,7 +1402,8 @@ var ExhaustiveDeps = {
1400
1402
message: "React Hook "+context.getSource(reactiveHook)+" was passed a "+'dependency list that is not an array literal. This means we '+"can't statically verify whether you've passed the correct "+'dependencies.'
0 commit comments