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: fix false positives of no-new-func #13333

Merged
merged 4 commits into from May 22, 2020
Merged

Fix: fix false positives of no-new-func #13333

merged 4 commits into from May 22, 2020

Conversation

g-plane
Copy link
Member

@g-plane g-plane commented May 20, 2020

Prerequisites checklist

  • I have read the contributing guidelines.
  • The team has reached consensus on the changes proposed in this pull request. If not, I understand that the evaluation process will begin with this pull request and won't be merged until the team has reached consensus.

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

[x] Bug fix

What changes did you make? (Give an overview)

Previously this rule doesn't check Function identifier via scope manager, which causes false positives. This PR fixes this.

Online demo with the rule that has bug.

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

Nothing.

@g-plane g-plane 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 20, 2020
tests/lib/rules/no-new-func.js Outdated Show resolved Hide resolved
@g-plane g-plane requested a review from kaicataldo May 21, 2020 01:16
lib/rules/no-new-func.js Outdated Show resolved Hide resolved
tests/lib/rules/no-new-func.js Show resolved Hide resolved
@g-plane g-plane requested a review from mdjermanovic May 21, 2020 11:02
lib/rules/no-new-func.js Outdated Show resolved Hide resolved
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@kaicataldo
Copy link
Member

LGTM, thanks!

@kaicataldo kaicataldo merged commit e3e4c41 into master May 22, 2020
@kaicataldo kaicataldo deleted the fix-no-new-func branch May 22, 2020 23:28
@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

3 participants