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

Unused var error missing when using es6 modules and arrow function (no-unused-vars) #4047

Closed
yangit opened this issue Oct 5, 2015 · 2 comments
Assignees
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

@yangit
Copy link

yangit commented Oct 5, 2015

export default (a, b)=> {
  console.log(a);
};

This code yields no errors.
Expected output is to get a no-unused-vars error for b variable.
Version is eslint 1.6.1
Settings are:

{
  "env": {
    "es6": true
  },
  "ecmaFeatures": {
    "modules": true
  },
  "rules": {
    "no-unused-vars": 2
  }
}
@eslintbot
Copy link

Thanks for the issue! If you're reporting a bug, please be sure to include:

  1. The version of ESLint you are using (run eslint -v)
  2. What you did (the source code and ESLint configuration)
  3. The actual ESLint output complete with numbers
  4. What you expected to happen instead

Requesting a new rule? Please see Proposing a New Rule for instructions.

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Oct 5, 2015
@yangit yangit changed the title Unused var error missing when using es6 modules and arrow function Unused var error missing when using es6 modules and arrow function (no-unused-vars) Oct 5, 2015
@ilyavolodin ilyavolodin added bug ESLint is working incorrectly rule Relates to ESLint's core rules question This issue asks a question about ESLint and removed triage An ESLint team member will look at this issue soon labels Oct 5, 2015
@mysticatea
Copy link
Member

Thank you for reporting.

I can reproduce this.
I will try to fix...

@mysticatea mysticatea added accepted There is consensus among the team that this change meets the criteria for inclusion and removed question This issue asks a question about ESLint labels Oct 6, 2015
@mysticatea mysticatea self-assigned this Oct 6, 2015
mysticatea added a commit to mysticatea/eslint that referenced this issue Oct 6, 2015
…4047)

If function expressions or arrow function expressions were exported,
these parameters had been not reported by `no-unused-vars`.
mysticatea added a commit to mysticatea/eslint that referenced this issue Oct 8, 2015
…4047)

If function expressions or arrow function expressions were exported,
these parameters had been not reported by `no-unused-vars`.
@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
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
Projects
None yet
Development

No branches or pull requests

4 participants