-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make unused variables a warning in eslint #8832
Conversation
|
IIUC this also doesn't error on unused variables in general now? e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of this! It's mostly an annoyance and often times I end up keeping my unused variable and renaming it to _oldName
anyway.
If there's two approvals to this, I won't block the PR! I think we can merge it then. |
Cool, glad this seems useful! Like all things linting you can always revisit this if people end up hating it. My personal preference is always for less linting in OSS due to PR friction, but I'm just a visitor here these days! |
Changes
An alternative is to move this responsibility to
tsc
vianoUnusedLocals
andnoUnusedParameters
, which also treats unused imports as warnings automatically (in VSCode, at least) but keeps the rest as errors. But conceptually I'd prefer to keep linting and building under separate tools (eslint
andtsc
) so I'd only recommend that change if others feel uneasy about unused variables not triggering CI.Testing
Docs