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

feat: Add sourceType:commonjs support #520

Merged
merged 2 commits into from Nov 21, 2021
Merged

feat: Add sourceType:commonjs support #520

merged 2 commits into from Nov 21, 2021

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Nov 16, 2021

Adds support for setting sourceType: commonjs. This causes the globalReturn flag to be set to true and changes sourceType on the Program node to be "commonjs".

Related: eslint/eslint-scope#81

Fixes #519

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.

I left one suggestion, everything else looks good to me.

lib/espree.js Outdated Show resolved Hide resolved
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!

@btmills btmills merged commit 27713ac into main Nov 21, 2021
@btmills btmills deleted the issue519 branch November 21, 2021 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support sourceType: commonjs
3 participants