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

Fix: no-new-symbol false positive with Symbol as an argument #13337

Merged
merged 1 commit into from May 22, 2020

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[X] Bug fix (template)

Tell us about your environment

  • ESLint Version: v7.0.0
  • Node Version: v12.14.0
  • npm Version: v6.13.4

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

default

Please show your full configuration:

Configuration
module.exports = {
  parserOptions: {
      ecmaVersion: 2015,
  }
}

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

Online Demo

/*eslint no-new-symbol: "error"*/
/*eslint-env es6*/

new foo(Symbol);

What did you expect to happen?

no errors

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

1 error

4:9  error  `Symbol` cannot be called as a constructor  no-new-symbol

What changes did you make? (Give an overview)

Check whether the identifier is callee.

Is there anything you'd like reviewers to focus on?

@mdjermanovic mdjermanovic added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion labels May 21, 2020
@kaicataldo
Copy link
Member

Nice find!

@kaicataldo kaicataldo merged commit 1710296 into master May 22, 2020
@kaicataldo kaicataldo deleted the nonewsymbol-param branch May 22, 2020 23:35
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Nov 19, 2020
@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 Nov 19, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants