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

Fix: not set ecmaVersion to 6 when sourceType=module (fixes #9687) #11649

Merged
merged 5 commits into from May 11, 2019

Conversation

Projects
None yet
5 participants
@aladdin-add
Copy link
Member

commented Apr 24, 2019

PR #11610 was aimed to fix the issue #9687, however it did not work,
since ecmaVersion has been normalized to 6 (when sourceType is setting to 'module').

this PR removed the normalize behaviour, and fixed failing tests.

What is the purpose of this pull request? (put an "X" next to item)

[x] Bug fix (template)

What changes did you make? (Give an overview)

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


assert.strictEqual(messages.length, 0);
});

// https://github.com/eslint/eslint/issues/9687

This comment has been minimized.

Copy link
@aladdin-add

aladdin-add Apr 24, 2019

Author Member

this is new added tests.

Show resolved Hide resolved tests/lib/linter.js Outdated
Show resolved Hide resolved lib/linter.js

@aladdin-add aladdin-add changed the title Fix: validate parserOptions ecmaVersion & sourceType (fixes #9687) Fix: do not set ecmaVersion to 6 when sourceType is "module" (fixes #9687) Apr 27, 2019

@aladdin-add aladdin-add force-pushed the aladdin-add:issue9687 branch from a237481 to 8ef2a69 Apr 27, 2019

@aladdin-add aladdin-add changed the title Fix: do not set ecmaVersion to 6 when sourceType is "module" (fixes #9687) Fix: not set ecmaVersion to 6 when sourceType=module (fixes #9687) Apr 27, 2019

@platinumazure

This comment has been minimized.

Copy link
Member

commented Apr 27, 2019

Should this be considered a breaking change?

@aladdin-add

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2019

Or it can be a bugfix -- the breaking change should have been introduced in #11610 . I fancy either is fine.

@mysticatea
Copy link
Member

left a comment

LGTM, thank you!

@not-an-aardvark
Copy link
Member

left a comment

LGTM, thanks!

@not-an-aardvark

This comment has been minimized.

Copy link
Member

commented May 10, 2019

It looks like there are merge conflicts.

@aladdin-add

This comment has been minimized.

Copy link
Member Author

commented May 10, 2019

will update it later.

aladdin-add added some commits Apr 24, 2019

Fix: validate parserOptions ecmaVersion & sourceType (fixes #9687)
PR #11610 was aimed to fix the issue #9687, however it did not work,
since ecmaVersion has been normalized to 6 (when sourceType is setting to 'module').

this PR removed the normalize behaviour, and fixed failing tests.

@aladdin-add aladdin-add force-pushed the aladdin-add:issue9687 branch from 7a24254 to f2a7d8f May 10, 2019

@platinumazure
Copy link
Member

left a comment

LGTM, thanks!

@not-an-aardvark not-an-aardvark merged commit f47d72c into eslint:master May 11, 2019

5 checks passed

commit-message PR title follows commit message guidelines
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details

@aladdin-add aladdin-add deleted the aladdin-add:issue9687 branch May 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.