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(typescript-estree): support for parsing 3.7 features #1045

Merged
merged 19 commits into from Oct 14, 2019

Conversation

@bradzacher
Copy link
Member

bradzacher commented Oct 4, 2019

Fixes #1033 (this doesn't add support for them in rules).

The AST I've gone with here is the same as the one babel (and flow) uses.
It looks like there is still an open question within ESTree itself whether or not it's the right direction to go in: estree/estree#146

Lacking a better option, I figured this was a good AST rep to go with.

@typescript-eslint

This comment has been minimized.

Copy link

typescript-eslint bot commented Oct 4, 2019

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@bradzacher bradzacher changed the title feat(typescript-estree): support parsing 3.7 features feat(typescript-estree): support for parsing 3.7 features Oct 4, 2019
package.json Outdated Show resolved Hide resolved
@cilice cilice referenced this pull request Oct 7, 2019
bradzacher added 7 commits Oct 8, 2019
@bradzacher bradzacher marked this pull request as ready for review Oct 8, 2019
bradzacher added 2 commits Oct 11, 2019
package.json Outdated Show resolved Hide resolved
@JamesHenry

This comment has been minimized.

Copy link
Member

JamesHenry commented Oct 12, 2019

I added to the README to clarify that we will not look to support pre-releases if doing so does not negatively impact the support for the latest stable version

bradzacher added 4 commits Oct 12, 2019
# Conflicts:
#	.gitignore
#	yarn.lock
@codecov

This comment has been minimized.

Copy link

codecov bot commented Oct 12, 2019

Codecov Report

Merging #1045 into master will increase coverage by 0.04%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1045      +/-   ##
==========================================
+ Coverage   94.01%   94.06%   +0.04%     
==========================================
  Files         115      115              
  Lines        5064     5086      +22     
  Branches     1416     1423       +7     
==========================================
+ Hits         4761     4784      +23     
+ Misses        175      174       -1     
  Partials      128      128
Impacted Files Coverage Δ
...t-plugin/src/rules/adjacent-overload-signatures.ts 93.02% <ø> (+2.11%) ⬆️
packages/parser/src/visitor-keys.ts 100% <ø> (ø) ⬆️
packages/eslint-plugin/src/rules/indent.ts 92.3% <ø> (ø) ⬆️
packages/typescript-estree/src/node-utils.ts 97.72% <100%> (ø) ⬆️
packages/typescript-estree/src/convert.ts 98.99% <100%> (+0.03%) ⬆️
packages/typescript-estree/src/parser.ts 91.89% <100%> (ø) ⬆️
...ackages/eslint-plugin/src/rules/prefer-readonly.ts 99.1% <100%> (ø) ⬆️
.../typescript-estree/src/ts-estree/ast-node-types.ts 100% <100%> (ø) ⬆️
@JamesHenry

This comment has been minimized.

Copy link
Member

JamesHenry commented Oct 14, 2019

@bradzacher FYI still failing on unit tests

@bradzacher

This comment has been minimized.

Copy link
Member Author

bradzacher commented Oct 14, 2019

Yeah there's something weird with ts-jest, composite projects and ts 3.7.
I reprod it locally once, then when I ran the failing test individually it went away completely.

Ill take another look.


edit: it stopped reproing locally because of the jest cache, running yarn test --no-cache revealed the error consistently.

I don't know why running the test individually "fixed" it. Running without the cache repros when running individually or as a batch.


edit: It seems like 3.7 is stricter with composite projects and project configs, so TS was erroring when the tests attempted to require a .ts file across the boundary.

bradzacher added 2 commits Oct 14, 2019
@bradzacher bradzacher merged commit 623febf into master Oct 14, 2019
7 checks passed
7 checks passed
Semantic Pull Request ready to be squashed
Details
codecov/patch 100% of diff hit (target 90%)
Details
codecov/project 94.06% (+0.04%) compared to 854620e
Details
typescript-eslint.typescript-eslint Build #20191014.5 succeeded
Details
typescript-eslint.typescript-eslint (Primary code validation and tests) Primary code validation and tests succeeded
Details
typescript-eslint.typescript-eslint (Run unit tests on other Node.js versions node_10_x) Run unit tests on other Node.js versions node_10_x succeeded
Details
typescript-eslint.typescript-eslint (Run unit tests on other Node.js versions node_8_x) Run unit tests on other Node.js versions node_8_x succeeded
Details
@bradzacher bradzacher deleted the 3-7-syntax-parsing branch Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.