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: support Auto Accessor syntax#5926

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
bradzacher merged 22 commits intotypescript-eslint:mainfromsosukesuzuki:auto-accesors
Nov 28, 2022

Conversation

sosukesuzuki
Copy link
Contributor

PR Checklist

Overview

Based on#5716
SupportsAuto Accessors.
ref:ESTree definition

csantos-nydig, JonghwanWon, and uhyo reacted with eyes emoji
@nx-cloud
Copy link

nx-cloudbot commentedNov 4, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commite510ce4. 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.

@netlify
Copy link

netlifybot commentedNov 4, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commite510ce4
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/6384072380ad6700083afd0e
😎 Deploy Previewhttps://deploy-preview-5926--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site settings.

# Conflicts:#package.json#patches/typescript+4.8.3.patch#patches/typescript+4.9.2-rc.patch#patches/typescript+4.9.3.patch#yarn.lock
@bradzacher
Copy link
Member

Clarifying ESTree naming consistency before we move forward on this -estree/estree#292

sosukesuzuki reacted with thumbs up emoji

@bradzacher
Copy link
Member

Looks like babel doesn't support type annotations on auto-accessors:babel/babel#15205

@bradzacher
Copy link
Member

In3c326c4 I added tooling to the ast-spec fixture tester which allows us to add config for specific fixtures.
This allows us to add a flag to certain fixtures explicitly expecting that babel should error due to it missing support. This lets us assert that some of the fixtures fail due tobabel/babel#15205.

For context, changes I have made to this PR:

  1. merged main
  2. addTSAbstractAccessorProperty, which aligns withTSAbstractPropertyDefinition.
  3. add above testing tooling changes
  4. add ast-spec fixture tests for the feature.

This PR is waiting for a decision on naming alignment discussion with ESTree (estree/estree#292)AccessorProperty vsAccessorPropertyDefinition.
This PR is ready to go with the nameAccessorProperty though.

@codecov
Copy link

codecovbot commentedNov 18, 2022
edited
Loading

Codecov Report

Merging#5926 (e510ce4) intomain (fe67b1e) willdecrease coverage by0.03%.
The diff coverage is73.91%.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #5926      +/-   ##==========================================- Coverage   91.28%   91.24%   -0.04%==========================================  Files         366      366                Lines       12363    12380      +17       Branches     3617     3621       +4     ==========================================+ Hits        11285    11296      +11- Misses        768      774       +6  Partials      310      310
FlagCoverage Δ
unittest91.24% <73.91%> (-0.04%)⬇️

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

Impacted FilesCoverage Δ
packages/typescript-estree/src/convert.ts97.13% <55.55%> (-0.50%)⬇️
...kages/scope-manager/src/referencer/ClassVisitor.ts92.74% <75.00%> (-1.43%)⬇️
packages/visitor-keys/src/visitor-keys.ts100.00% <100.00%> (ø)

@bradzacher
Copy link
Member

The AST is staying named as is, so no changes needed there.

Just need to add scope analysis support then this will be good to go.

dhoulb, benjaminwaterlot, and JoshuaKGoldberg reacted with hooray emoji

@bradzacherbradzacher marked this pull request as ready for reviewNovember 28, 2022 00:56
* The value should be a description of why there isn't support - for example a github issue URL.
*/
readonly expectBabelToNotSupport?: string;
}
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldbergNov 28, 2022
edited
Loading

Choose a reason for hiding this comment

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

👍

just noting - this is also ripe for#5932 &#6027

bradzacher reacted with thumbs up emoji
const type = (() => {
if (isAccessor) {
if (isAbstract) {
return AST_NODE_TYPES.TSAbstractAccessorProperty;
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldbergNov 28, 2022
edited
Loading

Choose a reason for hiding this comment

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

I'm confused why codecov thinks this isn't covered by tests. I can debug it locally to see theTSAbstractAccessorProperty andAccessorProperty cases being hit. Though, sourcemaps seem to not be working - maybe that's the issue?

Screenshot of debugging in VS Code, on a breakpoint in the `const result` variable below. A watch view shows type to be 'TSAbstractAccessorProperty'.

Copy link
Member

Choose a reason for hiding this comment

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

it might be because the tests are inast-spec instead of in here?
maybe we need to adjust how the coverage is collected?

Choose a reason for hiding this comment

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

Filed#6116 🤷

Comment on lines +104 to +111
readonly // require keys for all nodes NOT defined in `eslint-visitor-keys`
[T in Exclude<
AST_NODE_TYPES,
KeysDefinedInESLintVisitorKeysCore
>]: readonly GetNodeTypeKeys<T>[];
} & {
readonly // optionally allow keys for all nodes defined in `eslint-visitor-keys`
[T in KeysDefinedInESLintVisitorKeysCore]?: readonly GetNodeTypeKeys<T>[];
Copy link
Member

Choose a reason for hiding this comment

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

oooooof i didn't see that prettier formatted like this
disgusting.

JoshuaKGoldberg reacted with laugh emoji
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

I played around with this a bunch locally and it works great. Additional 🌟 for the testing infrastructure cleanups. This was also a great excuse for me to get more familiar with#6065 😄

🚢 !

bradzacher reacted with hooray emoji
@bradzacherbradzacher merged commitbecd1f8 intotypescript-eslint:mainNov 28, 2022
@sosukesuzukisosukesuzuki deleted the auto-accesors branchNovember 28, 2022 07:07
@sosukesuzuki
Copy link
ContributorAuthor

Thank you!!

@StanislavKharchenko

Hello!
When this feature will be available?

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

@bradzacherbradzacherbradzacher left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@sosukesuzuki@bradzacher@StanislavKharchenko@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp