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 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.

@bradzacher bradzacher added the enhancement New feature or request label Oct 4, 2019
@typescript-eslint
Copy link
Contributor

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
@bradzacher bradzacher marked this pull request as ready for review October 8, 2019 04:14
package.json Outdated Show resolved Hide resolved
@JamesHenry
Copy link
Member

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

@codecov
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
Copy link
Member

@bradzacher FYI still failing on unit tests

@bradzacher
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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Parsing Nullish Coalescing, Optional Chaining and Assertion Functions (TS 3.7)
4 participants