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

'no-unused-vars' shows varsIgnorePattern when argsIgnorePattern is not specified #9774

Closed
akouryy opened this issue Dec 26, 2017 · 2 comments · Fixed by #9791, mono-js/mono-notifications#5, mono-js/mono-push#5 or terrajs/lib-starter#5 · May be fixed by ali8889/emerald-wallet#4
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@akouryy
Copy link
Contributor

akouryy commented Dec 26, 2017

'no-unused-vars' shows varsIgnorePattern when argsIgnorePattern is not specified.

Tell us about your environment

  • ESLint Version:
    4.13.1 and 4.14.0
  • Node Version:
    8.1.3
  • npm Version:
    5.6.0

What parser (default, Babel-ESLint, etc.) are you using?
default

Please show your full configuration:

Configuration
env:
  browser: true
  es6: true
extends: 'eslint:recommended'
parserOptions:
  sourceType: module
rules:
  eqeqeq: error
  indent:
    - error
    - 4
  linebreak-style:
    - error
    - unix
  quotes:
    - off
    - double
  semi:
    - error
    - always
  no-unused-vars:
    - error
    - varsIgnorePattern: "^_$"

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

/*
  no-unused-vars:
    - error
    - varsIgnorePattern: "^_$"
*/
buttonActions($('#next-word'), _ => changeWord(1), _ => changeWord(10));
$ eslint *.js

What did you expect to happen?
I expected it to report that argsIgnorePattern is not specified, which caused this error.

What actually happened? Please include the actual, raw output from ESLint.
It told me about varsIgnorePattern, which confused me and made it difficult to understand the problem.

error  '_' is defined but never used. Allowed unused vars must match /^_$/
@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Dec 26, 2017
@platinumazure
Copy link
Member

Confirmed in the demo.

@platinumazure platinumazure added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Dec 26, 2017
@akouryy
Copy link
Contributor Author

akouryy commented Dec 29, 2017

I'm going to work on this.

akouryy pushed a commit to akouryy/eslint that referenced this issue Dec 29, 2017
akouryy pushed a commit to akouryy/eslint that referenced this issue Dec 29, 2017
Remove varsIgnorePattern incorrectly included in error messages of no-unused-vars.
aladdin-add pushed a commit that referenced this issue Dec 30, 2017
Remove varsIgnorePattern incorrectly included in error messages of no-unused-vars.
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jun 29, 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 Jun 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.