Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: [4.7] support optional variance annotation#4831

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

sosukesuzuki
Copy link
Contributor

@sosukesuzukisosukesuzuki commentedApr 17, 2022
edited by bradzacher
Loading

PR Checklist

Overview

Based on#4829

Support optional variance syntax.

@nx-cloud
Copy link

nx-cloudbot commentedApr 17, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit68c350b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 fromNxCloud.

@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 onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day.

@netlify
Copy link

netlifybot commentedApr 17, 2022
edited
Loading

👷 Deploy request fortypescript-eslint pending review.

Visit the deploys page to approve it

NameLink
🔨 Latest commit68c350b

@bradzacherbradzacher added the ASTPRs and Issues about the AST structure labelApr 25, 2022
@bradzacher
Copy link
Member

i merged the version bump so this can be rebased on top of main

@sosukesuzukisosukesuzuki marked this pull request as ready for reviewMay 17, 2022 15:16
@codecov
Copy link

codecovbot commentedMay 17, 2022
edited
Loading

Codecov Report

Merging#4831 (68c350b) intomain (c673e15) willincrease coverage by0.38%.
The diff coverage isn/a.

@@            Coverage Diff             @@##             main    #4831      +/-   ##==========================================+ Coverage   91.32%   91.70%   +0.38%==========================================  Files         132      359     +227       Lines        1487    12117   +10630       Branches      224     3518    +3294     ==========================================+ Hits         1358    11112    +9754- Misses         65      657     +592- Partials       64      348     +284
FlagCoverage Δ
unittest91.70% <ø> (+0.38%)⬆️

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

Impacted FilesCoverage Δ
packages/typescript-estree/src/convert.ts98.39% <ø> (ø)
packages/eslint-plugin/src/rules/no-shadow.ts78.48% <0.00%> (ø)
...kages/eslint-plugin/src/rules/naming-convention.ts81.09% <0.00%> (ø)
packages/eslint-plugin/src/rules/dot-notation.ts96.29% <0.00%> (ø)
packages/type-utils/src/isTypeReadonly.ts85.71% <0.00%> (ø)
...ackages/eslint-plugin/src/rules/no-explicit-any.ts92.85% <0.00%> (ø)
...ges/eslint-plugin/src/rules/no-extraneous-class.ts100.00% <0.00%> (ø)
...rc/rules/indent-new-do-not-use/BinarySearchTree.ts100.00% <0.00%> (ø)
packages/utils/src/ast-utils/eslint-utils/index.ts20.00% <0.00%> (ø)
...-plugin/src/rules/restrict-template-expressions.ts100.00% <0.00%> (ø)
... and218 more

@@ -2342,6 +2362,7 @@ export class Converter {
? this.convertType(node.constraint)
: undefined,
default: node.default ? this.convertType(node.default) : undefined,
...this.convertTypeParamVariances(node.modifiers),
Copy link
Collaborator

Choose a reason for hiding this comment

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

what do you think about changing it tohasModifier to be consistent with other use cases?

Suggested change
...this.convertTypeParamVariances(node.modifiers),
in:hasModifier(SyntaxKind.InKeyword,node)||undefined,
out:hasModifier(SyntaxKind.OutKeyword,node)||undefined,

Copy link
Member

@bradzacherbradzacherMay 17, 2022
edited
Loading

Choose a reason for hiding this comment

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

instead ofundefined - could we make itfalse?
I'd love for us to standardise on not emittingundefined for properties.
I personally don't like having 3 states on a flag - the keyword is either there, or it's not - there's no 3rd state!

armano2 and sosukesuzuki reacted with thumbs up emoji
bradzacher
bradzacher previously approved these changesMay 19, 2022
Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

this LGTM now! Thanks so much for helping us prep for 4.7!

@bradzacherbradzacher changed the titlefeat(typescript-estree): support optional variance annotationfeat: [4.7] support optional variance annotationMay 19, 2022
@bradzacherbradzacherenabled auto-merge (squash)May 19, 2022 04:36
@bradzacherbradzacher added the enhancementNew feature or request labelMay 19, 2022
@bradzacher
Copy link
Member

there's a few snapshots which need regenerating inast-spec -cd packages/ast-spec && yarn test -u

@sosukesuzuki
Copy link
ContributorAuthor

Thank you for reviewing! I've updated tests!

Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

brilliant - thanks for all your hard work!

@bradzacherbradzacher merged commit7e7b24c intotypescript-eslint:mainMay 19, 2022
@bradzacherbradzacher mentioned this pull requestMay 19, 2022
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJun 19, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@armano2armano2armano2 left review comments

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
ASTPRs and Issues about the AST structureenhancementNew feature or request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@sosukesuzuki@bradzacher@armano2

[8]ページ先頭

©2009-2025 Movatter.jp