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

Chore: enable no-prototype-builtins in codebase (fixes #10660) #10664

Merged
merged 5 commits into from
Aug 11, 2018

Conversation

aladdin-add
Copy link
Member

@aladdin-add aladdin-add commented Jul 24, 2018

refs #10660

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

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

What changes did you make? (Give an overview)

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

Do we want a way to find which rules can be enabled(to see if there's similar problems)?

@aladdin-add aladdin-add added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion chore This change is not user-facing labels Jul 24, 2018
@not-an-aardvark
Copy link
Member

I'm in favor of the idea, but there are a lot of existing use cases in the codebase that would need to be fixed before we can enable the rule.

@aladdin-add
Copy link
Member Author

will fix it asap!

Copy link
Member

@not-an-aardvark not-an-aardvark 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!

Copy link
Member

@ilyavolodin ilyavolodin left a comment

Choose a reason for hiding this comment

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

I would rather see Object.prototype.hasOwnProperty inlined everywhere, instead of creating a temp variable with {}.hasOwnProperty. To me it's less confusing and more readable when it's inlined and when it's not using shorthand. I don't feel very strongly about it, but would prefer it.

@kaicataldo
Copy link
Member

Agreed with @ilyavolodin.

@aladdin-add aladdin-add force-pushed the Aladdin-ADD-patch-2 branch 3 times, most recently from 2ca214e to c841b29 Compare August 10, 2018 11:39
Copy link
Member

@kaicataldo kaicataldo 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 for fixing this!

@kaicataldo
Copy link
Member

kaicataldo commented Aug 10, 2018

If we add a unit test as suggested in #10711, can we close the issue this is referencing in this PR? I ask because it looks like the other PR has stalled.

@aladdin-add aladdin-add changed the title Chore: enable no-prototype-builtins in codebase Chore: enable no-prototype-builtins in codebase (fixes #10660) Aug 11, 2018
@aladdin-add aladdin-add merged commit 6492233 into master Aug 11, 2018
@aladdin-add aladdin-add deleted the Aladdin-ADD-patch-2 branch August 11, 2018 03:37
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 8, 2019
@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants