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: do not throw when defining a global named __defineSetter__ #18364

Merged
merged 1 commit into from Apr 23, 2024

Conversation

aladdin-add
Copy link
Member

@aladdin-add aladdin-add commented Apr 19, 2024

It replaced {} with Object.create(null) to avoid accessing properties on the Object prototype.

fixes #18363

Prerequisites checklist

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

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

What changes did you make? (Give an overview)

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

Not sure if I should write a test for eslintrc as well: it's deprecated and will eventually be removed.

@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Apr 19, 2024
@github-actions github-actions bot added the core Relates to ESLint's core APIs and features label Apr 19, 2024
Copy link

netlify bot commented Apr 19, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 6fd6f4b
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/6625cbd2dc2b220008cc9bd7
😎 Deploy Preview https://deploy-preview-18364--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@aladdin-add aladdin-add added the accepted There is consensus among the team that this change meets the criteria for inclusion label Apr 19, 2024
@aladdin-add aladdin-add marked this pull request as ready for review April 19, 2024 07:45
@aladdin-add aladdin-add requested a review from a team as a code owner April 19, 2024 07:45
@aladdin-add
Copy link
Member Author

marking as draft, as I want to refactor the tests, and add a few more tests later.

It replaced {} with `Object.create(null)` to avoid accessing
properties on the Object prototype.

fixes eslint#18363
@aladdin-add aladdin-add marked this pull request as ready for review April 22, 2024 02:30
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Just need to wait for the patch release review before merging.

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!

@mdjermanovic mdjermanovic merged commit eeec413 into eslint:main Apr 23, 2024
18 checks passed
@aladdin-add aladdin-add deleted the issue18363 branch April 24, 2024 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Bug: defining a global named __defineSetter__ doesn't work
3 participants