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

eslint-parser: ES2020 features #11815

Merged
merged 8 commits into from Jul 29, 2020
Merged

eslint-parser: ES2020 features #11815

merged 8 commits into from Jul 29, 2020

Conversation

@JLHwung
Copy link
Contributor

JLHwung commented Jul 9, 2020

Q                       A
Fixed Issues? Fixes #11711
Minor: New Feature? Yes
Tests Added + Pass? Yes
Any Dependency Changes? eslint-visitor-keys is bumped to ^1.3.0 which includes the ChainExpression visitor keys.
License MIT

This PR adds estree parsing support on the following features:

  • optional chaining expression.
  • nullish coalescing
  • export * ns (credits to @existentialism)

The nullish coalescing is out of the box since ESTree and Babel shares the AST shape. Thus I have enabled test.

The @babel/parser estree plugin now supports parsing optional chaining and export * ns.

@babel-bot
Copy link
Collaborator

babel-bot commented Jul 9, 2020

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/25849/

@JLHwung JLHwung requested a review from jridgewell Jul 9, 2020
@codesandbox
Copy link

codesandbox bot commented Jul 9, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1d0f3d3:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration
Copy link
Member

nicolo-ribaudo left a comment

Can you add some fixtures tests for ChainExpression in @babel/parser?

eslint/babel-eslint-parser/src/convert/convertAST.js Outdated Show resolved Hide resolved
@kaicataldo
Copy link
Member

kaicataldo commented Jul 10, 2020

I don’t think this needs to block this PR, but we should make sure we bump the ESLint peer dep version once optional chaining lands in ESLint core (hopefully the next release).

I also have a PR open to upgrade to ESLint v7, so if we can land that it should be an easy bump :)

@kaicataldo
Copy link
Member

kaicataldo commented Jul 10, 2020

ESLint optional chaining PR here.

@JLHwung JLHwung force-pushed the JLHwung:babel-eslint-es2020 branch from 6935f68 to 8ac1984 Jul 10, 2020
JLHwung and others added 3 commits Jul 10, 2020
@existentialism existentialism added this to the 7.11.0 milestone Jul 10, 2020
@JLHwung JLHwung merged commit d7347fb into babel:main Jul 29, 2020
8 of 9 checks passed
8 of 9 checks passed
build
Details
test262-pr Workflow: test262-pr
Details
Gitpod Open an online workspace in Gitpod
Details
Travis CI - Pull Request Build Passed
Details
babel/repl REPL preview is available
Details
build-standalone Workflow: build-standalone
Details
ci/codesandbox Building packages succeeded.
Details
codecov/project 91.85% (target 90.00%)
Details
e2e Workflow: e2e
Details
@JLHwung JLHwung deleted the JLHwung:babel-eslint-es2020 branch Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.