Skip to content

Conversation

@Pixel998
Copy link
Contributor

@Pixel998 Pixel998 commented Sep 21, 2025

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 espree will remove ecmaFeatures.globalReturn. Top-level return statements are now allowed via sourceType: "commonjs", and specifying globalReturn will throw an error.

What changes did you make? (Give an overview)

  • Removed all references to globalReturn from parser options, types, etc.
  • Updated logic to derive top-level return behavior from sourceType === "commonjs" instead of globalReturn.
  • Updated tests to stop using globalReturn
  • Updated documentation to remove mentions of globalReturn

Refs eslint/js#692

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

@eslint-github-bot eslint-github-bot bot added the breaking This change is backwards-incompatible label Sep 21, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Sep 21, 2025
@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Sep 21, 2025
@github-actions github-actions bot added rule Relates to ESLint's core rules core Relates to ESLint's core APIs and features labels Sep 21, 2025
@netlify
Copy link

netlify bot commented Sep 21, 2025

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 2118e34
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/68e6ae74fe169c0008463eb5
😎 Deploy Preview https://deploy-preview-20145--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 project configuration.

@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion contributor pool labels Oct 6, 2025
@mdjermanovic mdjermanovic moved this from Needs Triage to Blocked in Triage Oct 8, 2025
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! Would like a second review.

@fasttime
Copy link
Member

fasttime commented Nov 1, 2025

As noted in eslint/js#525 (comment), we will revisit the decision to remove ecmaFeatures.globalReturn in v11. Until then, this pull request is blocked.

@fasttime fasttime added the blocked This change can't be completed until another issue is resolved label Nov 1, 2025
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 blocked This change can't be completed until another issue is resolved breaking This change is backwards-incompatible bug ESLint is working incorrectly core Relates to ESLint's core APIs and features rule Relates to ESLint's core rules

Projects

Status: Blocked

Development

Successfully merging this pull request may close these issues.

3 participants