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): add support for class static blocks #3730

Merged

Conversation

sosukesuzuki
Copy link
Contributor

@sosukesuzuki sosukesuzuki commented Aug 13, 2021

TypeScript 4.4 RC has been announced.

And it supports Stage-3 class static blocks ( https://devblogs.microsoft.com/typescript/announcing-typescript-4-4-rc/#static-blocks ).

This PR adds support for class static blocks.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @sosukesuzuki!

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.

@codecov
Copy link

codecov bot commented Aug 13, 2021

Codecov Report

Merging #3730 (7afb5b9) into master (055add0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3730   +/-   ##
=======================================
  Coverage   92.68%   92.68%           
=======================================
  Files         327      327           
  Lines       11351    11352    +1     
  Branches     3201     3201           
=======================================
+ Hits        10521    10522    +1     
  Misses        369      369           
  Partials      461      461           
Flag Coverage Δ
unittest 92.68% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/typescript-estree/src/node-utils.ts 97.83% <ø> (ø)
...pt-estree/src/ts-estree/estree-to-ts-node-types.ts 100.00% <ø> (ø)
packages/visitor-keys/src/visitor-keys.ts 100.00% <ø> (ø)
...n/src/rules/indent-new-do-not-use/OffsetStorage.ts 100.00% <100.00%> (ø)
packages/typescript-estree/src/convert.ts 98.27% <100.00%> (+<0.01%) ⬆️

@@ -45,7 +45,7 @@ export interface PunctuatorTokenToText {
[SyntaxKind.AtToken]: '@';
[SyntaxKind.QuestionQuestionToken]: '??';
[SyntaxKind.BacktickToken]: '`';
// [SyntaxKind.HashToken]: '#'; // new in PunctuationSyntaxKind in TS 4.4
[SyntaxKind.HashToken]: '#'; // new in PunctuationSyntaxKind in TS 4.4
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[SyntaxKind.HashToken]: '#'; // new in PunctuationSyntaxKind in TS 4.4
[SyntaxKind.HashToken]: '#';

Don't forget to remove all other TS 4.4 related comments in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I'll fix it later.

@bradzacher bradzacher added AST PRs and Issues about the AST structure enhancement New feature or request labels Aug 16, 2021
@sosukesuzuki
Copy link
Contributor Author

@bradzacher TypeScript 4.4 has been released. I know you are busy, but it would be great if you could review it for us.

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

I was going to merge this as part of the v5 but I guess that this is non-breaking and it's actually the only AST change we explicitly need for 4.4 support there's no need to wait

A very quick eyeball it looks fine - I'll give it a full review tomorrow.

package.json Outdated Show resolved Hide resolved
sosukesuzuki and others added 2 commits August 27, 2021 12:50
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for this!

@bradzacher bradzacher merged commit f81831b into typescript-eslint:master Aug 28, 2021
@sosukesuzuki sosukesuzuki deleted the support-static-blocks branch August 28, 2021 03:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AST PRs and Issues about the AST structure enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants