no-unused-vars should have an importIgnorePattern
See original GitHub issueThe version of ESLint you are using. 6.8.0
The problem you want to solve.
I have a custom stringify
helper that I may add in any file for debugging purpose, and I’m tired of adding/removing the import constantly. I cannot leave the import in the file, as eslint would nag me constantly about the unused import.
I do not wish either to have // eslint-disable-next-line no-unused-vars
in all my files.
Solution: Be able to disable no-unused-vars
for some unused imports.
Currently a similar feature exists for function arguments argsIgnorePattern
. But it does not seem to apply for unused imports.
Your take on the correct solution to problem.
{
no-unused-vars': ['warn', { 'importIgnorePattern': '^stringify$' }]
}
Are you willing to submit a pull request to implement this change? It depends on the complexity.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Ignoring the Spelling of Proper Nouns - Word Ribbon Tips
David wants Word to ignore the spelling of proper nouns when doing a spell check. It seems that his documents contain many, many...
Read more >5. Categorizing and Tagging Words - NLTK
Lexical categories like "noun" and part-of-speech tags like NN seem to have their uses, but the details will be obscure to many readers....
Read more >Linguistic Features · spaCy Usage Documentation
spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more....
Read more >Dealer's Guide to the Used Car Rule
Most car dealers who sell used vehicles must comply with the Federal Trade Commission's (FTC's) Used Car Rule. In fact, car dealers who...
Read more >Importing a Motor Vehicle | U.S. Customs and Border Protection
U.S. residents importing a new or used car should consult the Department of Motor Vehicles (DMV) in their state of residence about temporary ......
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
It looks like it can be good for a custom plugin / rule.
@francisminu
For typescript code you should use
@typescript-eslint/no-unused-vars
or@typescript-eslint/no-unused-vars-experimental
instead of the coreno-unused-vars
rule.