Add fix/suggestions to `no-unused-vars` rule
See original GitHub issueWhat rule do you want to change?
Add fix or suggestions to no-unused-vars
.
Does this change cause the rule to produce more or fewer warnings?
No
How will the change be implemented? (New option, new default behavior, etc.)?
Not sure, but I think at least some variables not has side effect can be safely removed.
Please provide some example code that this change will affect:
const foo = 1
import fs from 'fs'
What does the rule currently do for this code?
No fix, no suggestions.
What will the rule do after it’s changed?
Auto-fix errors or at least has suggestions.
Are you willing to submit a pull request to implement this change?
Maybe.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Answering Dealers' Questions about the Revised Used Car Rule
The revised Buyers Guide recommends that consumers get a vehicle history report before buying a used car and sends them to ftc.gov/usedcars for ......
Read more >Possessive Nouns
3 Rules to Make Possessives. • Rule 1: To form the possessive of a singular noun, add an apostrophe and s ('s) =...
Read more >6. Compounding Rules A compound word is a union of two or ...
A compound word is a union of two or more words, either with or without a hyphen. It conveys a unit idea that...
Read more >Used Car Lemon Law Fact Sheet
Your dealer must give you a written lemon-law warranty; Under the lemon-law warranty, the dealer must repair any defect in the covered parts,...
Read more >Nouns, Lesson 8: Possessive Nouns - English Grammar 101
Add 's to singular words to show possession. Dog's collar, sister's backpack, car's engine. (dog + 's), (sister + 's), (car ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe the
autofix/no-unused-vars
rule from eslint-plugin-autofix can be helpful for this use case.@tchakabam we don’t have a way to optionally apply auto fixes in this way. Suggestions is intended primarily for the editor use case, so that also doesn’t solve your problem of wanting to remove all unused variables in a codebase. I suppose we could provide the suggestions and you could write a tool on top of ESLint that uses that data to apply the fixes, but I don’t see us adding a way to do this type of mass variable removal in the core.