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(eslint-plugin): [no-shadow] exclude external type declaration merging#3959

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

@idan-at
Copy link
Contributor

@idan-atidan-at commentedOct 4, 2021
edited by bradzacher
Loading

Lately (not sure exactly which version), this snippet started failing no theno-shadow rule:

importtype{Foo}from'bar';declare module'bar'{exportinterfaceFoo{x:string;}

It shouldn't fail, since this is the way to extend external types in typescript (there's no re-declaration here)

This PR fixes it.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@idan-at!

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.

@nx-cloud
Copy link

nx-cloudbot commentedOct 4, 2021
edited
Loading

Nx Cloud Report

CI ran the following commands for commitb85322f. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

StatusCommand
#000000Node 12.x - nx run-many --target=typecheck --all --parallel
#000000Node 12.x - nx test @typescript-eslint/eslint-plugin-tslint
#000000Node 12.x - nx test @typescript-eslint/eslint-plugin
#000000Node 12.x - nx test @typescript-eslint/parser
#000000Node 12.x - nx test @typescript-eslint/eslint-plugin-internal
#000000Node 12.x - nx test @typescript-eslint/experimental-utils
#000000Node 12.x - nx test @typescript-eslint/eslint-plugin-tslint
#000000Node 12.x - nx test @typescript-eslint/scope-manager
#000000Node 12.x - nx test @typescript-eslint/eslint-plugin
#000000Node 12.x - nx test @typescript-eslint/visitor-keys
#000000Node 12.x - nx test @typescript-eslint/parser
#000000Node 12.x - nx test @typescript-eslint/typescript-estree
#000000Node 12.x - nx test @typescript-eslint/experimental-utils
#000000Node 12.x - nx run-many --target=build --all --parallel
#000000Node 12.x - nx test @typescript-eslint/scope-manager
#000000Node 12.x - nx test @typescript-eslint/visitor-keys
#000000Node 12.x - nx test @typescript-eslint/typescript-estree
#000000Node 12.x - nx run-many --target=build --all --parallel
#000000Node 12.x - nx prebuild @typescript-eslint/types
#000000Node 16.x - nx test @typescript-eslint/eslint-plugin-tslint

Sent with 💌 fromNxCloud.

@codecov
Copy link

codecovbot commentedOct 4, 2021
edited
Loading

Codecov Report

Merging#3959 (a57c4a0) intomaster (7842090) willincrease coverage by0.26%.
The diff coverage is90.00%.

❗ Current heada57c4a0 differs from pull request most recent headb85322f. Consider uploading reports for the commitb85322f to get more accurate results

@@            Coverage Diff             @@##           master    #3959      +/-   ##==========================================+ Coverage   93.12%   93.39%   +0.26%==========================================  Files         277      151     -126       Lines        9781     8103    -1678       Branches     2851     2572     -279     ==========================================- Hits         9109     7568    -1541+ Misses        244      181      -63+ Partials      428      354      -74
FlagCoverage Δ
unittest93.39% <90.00%> (+0.26%)⬆️

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

Impacted FilesCoverage Δ
packages/eslint-plugin/src/rules/no-shadow.ts76.51% <90.00%> (+1.10%)⬆️
packages/scope-manager/src/referencer/Reference.ts
packages/scope-manager/src/lib/es2019.string.ts
.../scope-manager/src/variable/ImplicitLibVariable.ts
packages/scope-manager/src/scope/CatchScope.ts
packages/scope-manager/src/lib/esnext.intl.ts
packages/scope-manager/src/lib/es2021.ts
...ckages/scope-manager/src/referencer/VisitorBase.ts
...e-manager/src/scope/FunctionExpressionNameScope.ts
packages/scope-manager/src/lib/esnext.symbol.ts
... and117 more

@bradzacherbradzacher added the enhancementNew feature or request labelOct 4, 2021
@bradzacherbradzacher changed the titlefix(eslint-plugin): [no-shadow] exclude external type declaration mer…feat(eslint-plugin): [no-shadow] exclude external type declaration mergingOct 4, 2021
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.

Looks great, thanks! Just requesting changes on the dead-ish code: either getting rid of it or adding a test case to exercise it.

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelOct 16, 2021
@idan-atidan-at dismissed a stale review via2b00d98October 17, 2021 11:34
@bradzacherbradzacher removed the awaiting responseIssues waiting for a reply from the OP or another party labelOct 18, 2021
Copy link
Member

@bradzacherbradzacher left a comment
edited
Loading

Choose a reason for hiding this comment

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

perfect - thanks for thsi!

nice work making it so strict - this is amazing!

@bradzacherbradzacher merged commita93cebf intotypescript-eslint:masterNov 1, 2021
@idan-atidan-at deleted the no-shadow-external-merging branchNovember 1, 2021 08:30
This was referencedNov 2, 2021
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsDec 2, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg requested changes

@bradzacherbradzacherbradzacher approved these changes

+1 more reviewer

@rafaelss95rafaelss95rafaelss95 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

enhancementNew feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@idan-at@JoshuaKGoldberg@bradzacher@rafaelss95

[8]ページ先頭

©2009-2025 Movatter.jp