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(typescript-estree): add type checker wrapper APIs to ParserServicesWithTypeInformation#6404

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

Conversation

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

Adds toParserServicesWithTypeInformation the two most commonly used TypeScript type checking APIs:getSymbolAtLocation andgetTypeAtLocation. Then converts all places in code that I could find that used either after immediately retrieving the TS node for an ES node.

Also applies a few standardizations that helped me find-and-replace:

  • const services = util.getParserServices(context) - not a variable namedparserServices, or variables from{ ... }
  • const checker = services.program.getTypeChecker() - not a variable namedtypeChecker ortypes, and not an intermediateprogram variable

Updates theCustom Rules docs page to reflect this.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@JoshuaKGoldberg!

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.

@nx-cloud
Copy link

nx-cloudbot commentedJan 31, 2023
edited
Loading

☁️ Nx Cloud Report

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

@codecov
Copy link

codecovbot commentedJan 31, 2023
edited
Loading

Codecov Report

Merging#6404 (506bf57) intov6 (1c3f470) willdecrease coverage by0.28%.
The diff coverage is97.73%.

❗ Current head506bf57 differs from pull request most recent heade7977f1. Consider uploading reports for the commite7977f1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@##               v6    #6404      +/-   ##==========================================- Coverage   91.87%   91.60%   -0.28%==========================================  Files         359      355       -4       Lines       12400    12155     -245       Branches     3653     3581      -72     ==========================================- Hits        11393    11134     -259- Misses        703      723      +20+ Partials      304      298       -6
FlagCoverage Δ
unittest91.60% <97.73%> (-0.28%)⬇️

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

Impacted FilesCoverage Δ
...ges/type-utils/src/getConstrainedTypeAtLocation.ts0.00% <0.00%> (ø)
packages/type-utils/src/getDeclaration.ts0.00% <0.00%> (ø)
...ages/typescript-estree/src/createParserServices.ts71.42% <71.42%> (ø)
...gin-internal/src/rules/no-poorly-typed-ts-props.ts87.50% <100.00%> (-1.39%)⬇️
...lugin-internal/src/rules/plugin-test-formatting.ts79.76% <100.00%> (ø)
packages/eslint-plugin-tslint/src/rules/config.ts97.22% <100.00%> (ø)
packages/eslint-plugin/src/rules/await-thenable.ts100.00% <100.00%> (ø)
...eslint-plugin/src/rules/consistent-type-exports.ts97.67% <100.00%> (-0.03%)⬇️
packages/eslint-plugin/src/rules/dot-notation.ts96.29% <100.00%> (-0.14%)⬇️
...gin/src/rules/naming-convention-utils/validator.ts96.79% <100.00%> (-0.03%)⬇️
... and62 more

@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewJanuary 31, 2023 21:35
@JoshuaKGoldbergJoshuaKGoldberg added this to the6.0.0 milestoneJan 31, 2023
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.

I'm happy with this! Noice

@JoshuaKGoldbergJoshuaKGoldberg merged commit62d5755 intotypescript-eslint:v6Feb 5, 2023
@JoshuaKGoldbergJoshuaKGoldberg deleted the services-type-checker-wrappers branchFebruary 5, 2023 05:13
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsFeb 13, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher approved these changes

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

Successfully merging this pull request may close these issues.

2 participants
@JoshuaKGoldberg@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp