-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
fix!: remove ecmaFeatures.globalReturn
#20145
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
mdjermanovic
left a comment
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 a second review.
|
As noted in eslint/js#525 (comment), we will revisit the decision to remove |
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
[x] Add something to the core
[ ] Other, please explain:
The next release of
espreewill removeecmaFeatures.globalReturn. Top-level return statements are now allowed viasourceType: "commonjs", and specifyingglobalReturnwill throw an error.What changes did you make? (Give an overview)
globalReturnfrom parser options, types, etc.sourceType === "commonjs"instead ofglobalReturn.globalReturnglobalReturnRefs eslint/js#692
Is there anything you'd like reviewers to focus on?