Navigation Menu

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

use astUtils.getStaticPropertyName in no-prototype-builtins #13088

Closed
mdjermanovic opened this issue Mar 25, 2020 · 5 comments · Fixed by #13755
Closed

use astUtils.getStaticPropertyName in no-prototype-builtins #13088

mdjermanovic opened this issue Mar 25, 2020 · 5 comments · Fixed by #13755
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 enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules

Comments

@mdjermanovic
Copy link
Member

What rule do you want to change?

no-prototype-builtins

Does this change cause the rule to produce more or fewer warnings?

more

How will the change be implemented? (New option, new default behavior, etc.)?

new default behavior

Please provide some example code that this change will affect:

/*eslint no-prototype-builtins: "error"*/

var hasBarProperty = foo["hasOwnProperty"]("bar");

var isPrototypeOfBar = foo['isPrototypeOf'](bar);

var barIsEnumerable = foo[`propertyIsEnumerable`]("bar");

What does the rule currently do for this code?

no errors

What will the rule do after it's changed?

3 errors

Are you willing to submit a pull request to implement this change?

Yes.

@mdjermanovic mdjermanovic added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Mar 25, 2020
@mdjermanovic mdjermanovic self-assigned this Mar 25, 2020
@kaicataldo
Copy link
Member

I would argue that this is a bug in the current rule.

@mdjermanovic
Copy link
Member Author

I'd also agree with treating this issue as a bug.

@nanbeinanbei
Copy link

when can we get it changed?

@btmills btmills 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 Oct 12, 2020
@btmills
Copy link
Member

btmills commented Oct 12, 2020

This is now accepted, and I agree we can treat it as a semver-minor bug fix.

@mdjermanovic
Copy link
Member Author

I'm working on this.

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Apr 18, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Apr 18, 2021
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 enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants