Skip to content
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

disable check for unused variable #2173

Closed
sfabriece opened this issue Mar 29, 2015 · 4 comments
Closed

disable check for unused variable #2173

sfabriece opened this issue Mar 29, 2015 · 4 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion

Comments

@sfabriece
Copy link

How can i disable a check for one unused variable while still checking all the other?

@nzakas
Copy link
Member

nzakas commented Mar 29, 2015

You can use an inline comment to disable rules in specific areas. See http://eslint.org/docs/user-guide/configuring#configuring-rules

@nzakas nzakas closed this as completed Mar 29, 2015
@servel333
Copy link

For clarity and a specific example for others:

  var some_unused_variable; // eslint-disable-line no-unused-vars

@jacklovepdf
Copy link

any other good idea?

@platinumazure
Copy link
Member

@jacklovepdf We now have a varsIgnorePattern option available for this use case (best suited for ignoring specific unused variable names or patterns across all your files).

It's always worth checking the rule documentation to see if there are good options. Our rules documentation can be found here: https://eslint.org/docs/rules

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

No branches or pull requests

5 participants