Bug: no-unused-vars
is triggered for arguments of function type definitions
#17852
-
EnvironmentNode version: v20.4.0 What parser are you using?@typescript-eslint/parser What did you do?Configuration
export type MyType = {
exec: (command: string) => Promise<void>;
}; What did you expect to happen?I would expect this to be fine. What actually happened?I get the following warning:
Link to Minimal Reproducible Examplehttps://stackblitz.com/edit/eslint-repro-2023-12-13 Participation
Additional commentsNo response |
Beta Was this translation helpful? Give feedback.
Answered by
kecrily
Dec 13, 2023
Replies: 2 comments
-
You should use the typescript-eslint extended no-unused-vars rule {
// Note: you must disable the base rule as it can report incorrect errors
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
iFreilicht
-
Jup, that works perfectly. Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should use the typescript-eslint extended no-unused-vars rule