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: support ?? operator, import.meta, and export * as ns #13196

Merged
merged 11 commits into from Jun 4, 2020

Conversation

mysticatea
Copy link
Member

@mysticatea mysticatea commented Apr 19, 2020

Prerequisites checklist

  • I have read the contributing guidelines.
  • The team has reached consensus on the changes proposed in this pull request. If not, I understand that the evaluation process will begin with this pull request and won't be merged until the team has reached consensus.

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

[X] Changes an existing rule and existing core feature

What changes did you make? (Give an overview)

This PR upgrades dependencies and updates rules and code path analysis in order to support new syntax. Refs #12642, fixes #12629, fixes #13133.

[EDIT]: Optional chaining is still stuck and acorn has been released with the other parts. Therefore, we separate optional chaining from this PR.

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

  • Are there other rules we need to update?

@mysticatea mysticatea added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules core Relates to ESLint's core APIs and features new syntax This issue is related to new syntax that has reached stage 4 labels Apr 19, 2020
@mdjermanovic
Copy link
Member

As for export * as ns, this might also affect no-duplicate-imports (issues #12758 and #12760), but I guess it doesn't make sense to change anything in this PR, unless PRs for those two issues get merged first (otherwise, those PRs should account for export * as ns).

Other than that, I believe the list is complete (keyword-spacing and no-restricted-exports).

no-restricted-imports, camelcase, id_blacklist, and id-match should just work.

id_length and no_underscore_dangle will not work, but these two rules already don't check exported names at all.

@aldeed
Copy link

aldeed commented May 4, 2020

@mysticatea is this making it into v7 release? The v7 RC doesn't truly have ESM support right now since almost every ESM Node project has import.meta.url in some files.

@mysticatea
Copy link
Member Author

@aldeed We are waiting for upstreams. I guess this PR will be landed on v7.1.0 or v7.2.0.

@mysticatea
Copy link
Member Author

Optional chaining syntax still stays on the spec discussion, but the upstreams have been released along with the other syntax. Therefore, I separated the optional chaining from this PR in order to merge this PR soonly.

@mysticatea mysticatea marked this pull request as ready for review June 4, 2020 12:54
Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

Copy link
Member

@btmills btmills left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for doing this @mysticatea! As part of this, I think I finally understand how code path analysis works!

@kaicataldo kaicataldo merged commit dd949ae into master Jun 4, 2020
@kaicataldo kaicataldo deleted the es2020-new-syntax branch June 4, 2020 21:53
@ljharb
Copy link
Sponsor Contributor

ljharb commented Jun 4, 2020

Is the PR title no longer accurate?

@btmills
Copy link
Member

btmills commented Jun 5, 2020

@ljharb optional chaining is the only thing not in this PR. The other three features are included. Is that what you mean?

@ljharb
Copy link
Sponsor Contributor

ljharb commented Jun 5, 2020

Ah ok, so this does include nullish coalescing :-) thanks!

@dreyks
Copy link

dreyks commented Jun 11, 2020

acornjs/acorn#891 is now merged, so hopefully, we can get back to this soon(ish) (once acorn gets a new release)

@dreyks
Copy link

dreyks commented Jun 11, 2020

released as https://github.com/acornjs/acorn/releases/tag/7.3.0

@stefan505
Copy link

When will this be released for eslint?

@kaicataldo
Copy link
Member

This PR was released in the latest version (v7.2.0).

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Dec 2, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Dec 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features enhancement This change enhances an existing feature of ESLint new syntax This issue is related to new syntax that has reached stage 4 rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support import.meta Support export * as ns from "source"
8 participants