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: drop structuredClone polyfill for v9 #17915
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
|
@aladdin-add this seems to be related to |
Yes, will take a look later! also, I'm changing the pr title |
In the meantime, I think we can enable the global variable manually in this PR to make the linting pass. Lines 100 to 102 in 8792464
languageOptions: {
- ecmaVersion: "latest",
+ ecmaVersion: "latest",
+ globals: {
+ structuredClone: "readonly"
+ }
}, |
Okay, this works now with the new version of eslint-plugin-n, there's no need to update our eslint.config.js. |
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! Would like @nzakas to verify before merging.
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!
I noticed this comment about a thing which could be removed and wanted to make sure it didn't get lost. Happy to close this if you don't want to worry about it.
This doesn't pass linting becauseFixed by upgrade to eslint-plugin-n, see below.no-undef
claims thatstructuredClone
is not defined, but I couldn't for the life of me figure out why. Theglobals
package has listedstructuredClone
innode
since13.12.0
.Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] 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
[x] Other, please explain:
Removes a dependency which is no longer necessary in v9.
What changes did you make? (Give an overview)
Removed a polyfill.
Is there anything you'd like reviewers to focus on?