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

strict: function should not warn functions which have a non-simple parameter #6405

Closed
mysticatea opened this issue Jun 14, 2016 · 2 comments
Closed
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

@mysticatea
Copy link
Member

What version of ESLint are you using?

  • 2.12.0

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

  • default

Please show your full configuration:

  • nothing

What did you do? Please include the actual source code causing the issue.

function foo(a = 0) {
}
> eslint test.js --rule "strict:[error, function]" --env es6 --no-eslintrc --no-ignore

What did you expect to happen?

No error.
Because it's a syntax error in ES7/later if "use strict" is written there.

What actually happened? Please include the actual, raw output from ESLint.

test.js
  1:1  error  Use the function form of 'use strict'  strict

✖ 1 problem (1 error, 0 warnings)
@mysticatea mysticatea added bug ESLint is working incorrectly rule Relates to ESLint's core rules evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jun 14, 2016
@nzakas
Copy link
Member

nzakas commented Jun 15, 2016

Seems like a good idea. 👍

@ilyavolodin
Copy link
Member

👍

@ilyavolodin ilyavolodin reopened this Jun 15, 2016
@mysticatea mysticatea self-assigned this Jun 15, 2016
@mysticatea mysticatea added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jun 15, 2016
nzakas pushed a commit that referenced this issue Jun 21, 2016
…6464)

* Fix: `strict` rule reports a syntax error for ES2016 (fixes #6405)

* followes suggestions
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 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 6, 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

3 participants