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

@typescript-eslint typescript-eslint bot commented Aug 13, 2021

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.

Loading

@codecov
Copy link

@codecov 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%) ⬆️

Loading

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

@MichaelDeBoey MichaelDeBoey Aug 15, 2021

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

Loading

Copy link
Contributor Author

@sosukesuzuki sosukesuzuki Aug 15, 2021

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.

Loading

@sosukesuzuki sosukesuzuki force-pushed the support-static-blocks branch from cbe8fb3 to 8c4c8d3 Aug 27, 2021
@sosukesuzuki
Copy link
Contributor Author

@sosukesuzuki sosukesuzuki commented Aug 27, 2021

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

Loading

Copy link
Member

@bradzacher bradzacher left a comment

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.

Loading

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

@bradzacher bradzacher left a comment

LGTM - thanks for this!

Loading

@bradzacher bradzacher merged commit f81831b into typescript-eslint:master Aug 28, 2021
11 checks passed
Loading
@sosukesuzuki sosukesuzuki deleted the support-static-blocks branch Aug 28, 2021
@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.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants