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

Update ecmaVersion to 'latest' in esnext.js in eslint-plugin to ensure it's esnext. #296

Merged
merged 7 commits into from Nov 26, 2021

Conversation

iamyoki
Copy link
Contributor

@iamyoki iamyoki commented Oct 22, 2021

Description

This PR updates a simple config in esnext.js in eslint-plugin, it prevents some potential problems.
It updates

  parserOptions: {
    ecmaVersion: '2018',
    sourceType: 'module',
  }

to

  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
  }

so to ensure it always be esnext latest version.

Here is the official docs mentioned: https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options.

Also updates env es6 to es2021.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above (Documentation fix and Test update does not need a changelog as we do not publish a new version for these changes)

@ghost ghost added the cla-needed label Oct 22, 2021
@iamyoki
Copy link
Contributor Author

iamyoki commented Oct 22, 2021

CLA assigned. Please reruns..

@ghost ghost removed the cla-needed label Nov 11, 2021
@atesgoral atesgoral requested a review from a team November 11, 2021 18:43
@lucabezerra
Copy link

@iamyoki Thanks for the contribution and apologies for the delay. Do you mind adding an entry in the corresponding CHANGELOG.md, under the Unreleased > Changed section?

@iamyoki
Copy link
Contributor Author

iamyoki commented Nov 11, 2021

@lucabezerra No problem.

@lucabezerra
Copy link

lucabezerra commented Nov 11, 2021

@iamyoki Actually I meant under the Unreleased > Changed section. I think you might have an outdated version of the repo, but if you look at the current version of that file, the Unreleased section is uncommented and actually has an entry in it already :)

@iamyoki
Copy link
Contributor Author

iamyoki commented Nov 11, 2021

@lucabezerra Yeah, my mistake, fixed.

@lucabezerra
Copy link

@iamyoki I think you added it twice by mistake, heh :)

@iamyoki
Copy link
Contributor Author

iamyoki commented Nov 11, 2021

@lucabezerra Hah, finally.

Copy link
Member

@BPScott BPScott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest isn't supported in our the parsers versions that we currently require.

Let's have use ecmaVersion: 2021 to get us onto the latest version in this PR

Then if you're feeling a brave, open new PRs for replacing babel-eslint with @babel/eslint-parser, and updating @typescript-eslint/parser to the latest version in the v4 branch (we'll want to go to v5 at some point but perhaps we should do that as part of the plugin updates required to support eslint v8).

packages/eslint-plugin/lib/config/esnext.js Outdated Show resolved Hide resolved
@BPScott BPScott merged commit 69c32c1 into Shopify:main Nov 26, 2021
@BPScott BPScott mentioned this pull request Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants