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: add package scope-manager#1939

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 1 commit intomasterfromscope-analysis
Jun 29, 2020
Merged

feat: add package scope-manager#1939

bradzacher merged 1 commit intomasterfromscope-analysis
Jun 29, 2020

Conversation

bradzacher
Copy link
Member

@bradzacherbradzacher commentedApr 27, 2020
edited
Loading

Ref#1856

This is an alternate approach to#1533.
Instead of just extending bits and pieces, bring the entire codebase in, clean it up and rebuild it to have native support for TS types.

I found that trying to make the types work was a complete pain because we need a custom typed version of each class anyway.
I figure that we support our own set of JS on top of whateslint-scope supports, so it's probably better we maintain the entire stack so we don't do any hacky extension things.

We don't want to get into a position where the base package adds handling we weren't expecting.

WIP

  • forkeslint-scope,
  • fork theeslint-scope tests,
    • added types
    • restructured the code for better type safety
    • deleted based on deprecated removals above
  • support:
    • ClassProperty
    • Decorator
    • OptionalMemberExpression
    • OptionalCallExpression
    • TSAbstractClassProperty
    • TSAbstractMethodDefinition
    • TSAsExpression
    • TSDeclareFunction
    • TSExportAssignment
    • TSImportEqualsDeclaration
    • TSInterfaceDeclaration
    • TSMappedType
    • TSModuleDeclaration (will need their own scope)
    • TSParameterProperty
    • TSTypeAliasDeclaration
    • TSTypeAssertion
    • TSTypeParameter
    • TSTypePredicate
    • TSEnumDeclaration (will need their own scope)
  • prevent invalid identifiers in type locations from creating references
    • property signature name
      • TSPropertySignature
    • function/method/call/construct signature parameter names
      • TSCallSignatureDeclaration
      • TSConstructorType
      • TSConstructSignatureDeclaration
      • TSEmptyBodyFunctionExpression
      • TSFunctionType
      • TSMethodSignature
    • index signature parameter name
      • TSIndexSignature
  • support type locations on non-type nodes
    • class implements
    • class extends type parameter instantiation
    • variable types
    • parameter types
    • function type parameter decls
    • call type parameter instantiation
    • treat normal imports as type/values, treat type only imports as types.
  • update to handle our v3.0.0 changes

BASED ON#2230

Must be retargeted before merging

anikethsaha, sosukesuzuki, NMinhNguyen, and sudokzt reacted with hooray emoji
@bradzacherbradzacher added the enhancementNew feature or request labelApr 27, 2020
@typescript-eslint
Copy link
Contributor

Thanks for the PR,@bradzacher!

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.

@bradzacherbradzacherforce-pushed thescope-analysis branch 3 times, most recently from895f1a2 to0375ebfCompareMay 3, 2020 03:07
@codecov
Copy link

codecovbot commentedMay 3, 2020
edited
Loading

Codecov Report

Merging#1939 intomaster willdecrease coverage by0.19%.
The diff coverage is92.26%.

@@            Coverage Diff             @@##           master    #1939      +/-   ##==========================================- Coverage   93.29%   93.09%   -0.20%==========================================  Files         173      282     +109       Lines        7789     9014    +1225       Branches     2284     2463     +179     ==========================================+ Hits         7267     8392    +1125- Misses        247      301      +54- Partials      275      321      +46
FlagCoverage Δ
#unittest93.09% <92.26%> (-0.20%)⬇️
Impacted FilesCoverage Δ
packages/eslint-plugin/src/configs/all.ts100.00% <ø> (ø)
packages/eslint-plugin/src/configs/base.ts100.00% <ø> (ø)
...src/configs/recommended-requiring-type-checking.ts100.00% <ø> (ø)
packages/eslint-plugin/src/configs/recommended.ts100.00% <ø> (ø)
packages/scope-manager/src/lib/dom.ts100.00% <ø> (ø)
packages/scope-manager/src/assert.ts33.33% <33.33%> (ø)
.../scope-manager/src/variable/ImplicitLibVariable.ts50.00% <50.00%> (ø)
...ges/scope-manager/src/referencer/PatternVisitor.ts69.04% <69.04%> (ø)
packages/scope-manager/src/analyze.ts69.23% <69.23%> (ø)
packages/scope-manager/src/ScopeManager.ts75.00% <75.00%> (ø)
... and213 more

@bradzacherbradzacherforce-pushed thescope-analysis branch 2 times, most recently from80487d5 todaa415cCompareMay 6, 2020 08:47
@bradzacherbradzacherforce-pushed thescope-analysis branch 2 times, most recently from34a36dc to3c94b99CompareMay 18, 2020 09:11
@bradzacherbradzacherforce-pushed thescope-analysis branch 4 times, most recently from883d48e toa810f23CompareMay 24, 2020 04:27
@bradzacherbradzacher added the blocked by another PRPRs which are ready to go but waiting on another PR labelJun 19, 2020
@bradzacherbradzacher changed the base branch frommaster toadd-package-visitor-keysJune 19, 2020 22:09
@bradzacherbradzacherforce-pushed theadd-package-visitor-keys branch frome199658 toe1d94e7CompareJune 25, 2020 00:07
@bradzacherbradzacherforce-pushed theadd-package-visitor-keys branch frome1d94e7 tod0235aaCompareJune 25, 2020 00:21
Base automatically changed fromadd-package-visitor-keys tomasterJune 25, 2020 00:30
@bradzacherbradzacher removed the blocked by another PRPRs which are ready to go but waiting on another PR labelJun 25, 2020
@bradzacherbradzacherforce-pushed thescope-analysis branch 6 times, most recently fromad91323 to05b58edCompareJune 29, 2020 04:22
@bradzacherbradzacher marked this pull request as ready for reviewJune 29, 2020 08:37
@bradzacherbradzacher merged commit682eb7e intomasterJun 29, 2020
@bradzacherbradzacher deleted the scope-analysis branchJune 29, 2020 08:53
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJul 30, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
enhancementNew feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp