-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Conversation
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. |
will fix it asap! |
4a9e825
to
33351ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this 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.
Agreed with @ilyavolodin. |
2ca214e
to
c841b29
Compare
There was a problem hiding this 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!
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. |
812f31f
to
0117d32
Compare
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)?