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
Bug: defining a global named __defineSetter__
doesn't work
#18363
Comments
Thanks for the report, I was able to repro! |
aladdin-add
added a commit
to aladdin-add/eslint
that referenced
this issue
Apr 19, 2024
It replaced {} with `Object.create(null)` to avoid accessing properties on the Object prototype. fixes eslint#18363
1 task
aladdin-add
added a commit
to aladdin-add/eslint
that referenced
this issue
Apr 19, 2024
It replaced {} with `Object.create(null)` to avoid accessing properties on the Object prototype. fixes eslint#18363
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
added a commit
to aladdin-add/eslint
that referenced
this issue
Apr 22, 2024
It replaced {} with `Object.create(null)` to avoid accessing properties on the Object prototype. fixes eslint#18363
aladdin-add
added a commit
to aladdin-add/eslint
that referenced
this issue
Apr 22, 2024
It replaced {} with `Object.create(null)` to avoid accessing properties on the Object prototype. fixes eslint#18363
mdjermanovic
pushed a commit
that referenced
this issue
Apr 23, 2024
It replaced {} with `Object.create(null)` to avoid accessing properties on the Object prototype. fixes #18363
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
https://eslint.org/play/#eyJ0ZXh0IjoiLypnbG9iYWwgX19kZWZpbmVTZXR0ZXJfXywgYSovXG5cbl9fZGVmaW5lU2V0dGVyX18gPSA0MjsiLCJvcHRpb25zIjp7InJ1bGVzIjp7Im5vLXVuZGVmIjpbImVycm9yIl19LCJsYW5ndWFnZU9wdGlvbnMiOnsicGFyc2VyT3B0aW9ucyI6eyJlY21hRmVhdHVyZXMiOnt9fX19fQ==
What parser are you using?
Default (Espree)
What did you do?
Defining a global named
__defineSetter
causes eslint to crash if done in an inline comment. It also seems not to work if done in a config file.https://eslint.org/play/#eyJ0ZXh0IjoiLypnbG9iYWwgX19kZWZpbmVTZXR0ZXJfXywgYSovXG5cbl9fZGVmaW5lU2V0dGVyX18gPSA0MjsiLCJvcHRpb25zIjp7InJ1bGVzIjp7Im5vLXVuZGVmIjpbImVycm9yIl19LCJsYW5ndWFnZU9wdGlvbnMiOnsicGFyc2VyT3B0aW9ucyI6eyJlY21hRmVhdHVyZXMiOnt9fX19fQ==
Configuration
What did you expect to happen?
It should treat
__defineSetter__
as a valid global.What actually happened?
ESLint crashes. When specified in the
globals
object in a config rather than an inline comment, it doesn't crash but it also doesn't seem to respect the global.Link to Minimal Reproducible Example
https://eslint.org/play/#eyJ0ZXh0IjoiLypnbG9iYWwgX19kZWZpbmVTZXR0ZXJfXywgYSovXG5cbl9fZGVmaW5lU2V0dGVyX18gPSA0MjsiLCJvcHRpb25zIjp7InJ1bGVzIjp7Im5vLXVuZGVmIjpbImVycm9yIl19LCJsYW5ndWFnZU9wdGlvbnMiOnsicGFyc2VyT3B0aW9ucyI6eyJlY21hRmVhdHVyZXMiOnt9fX19fQ==
Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: