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
feat: Add prefer-object-has-own rule. #15206
Conversation
Hi @Gautam-Arora24!, thanks for the Pull Request The first commit message isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
|
daf7f3f
to
beb55e3
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.
thanks for the PR! I've left a few questions.
@Gautam-Arora24 you can run |
d21c5e9
to
7f15375
Compare
The latest changes contain ->
|
@Gautam-Arora24 are you still working on this? |
Sorry @nzakas for the delay. I will create followup commits soon :) |
Sorry @nzakas but I am not getting enough time for this PR. If someone wants to pick it up, he/she can feel free to do so :) |
I will fininsh it 👍 |
closing in favor of the new PR #15206 |
I think you meant #15346 |
Definitely 👍 |
Fixes #14939
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[X] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
This PR focuses on adding a new rule called
prefer-object-has-own
. The PR adheres to the guidelines provided and has tests and documentation included. This rule requires usingObject.hasOwn
instead ofObject.prototype.hasOwnProperty
.Is there anything you'd like reviewers to focus on?
Caveats ->
The PR doesn't contain any fixes for the rule.
Fixes #14939