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

fix(eslint-plugin): [no-restricted-imports] disallow side effect imports when allowTypeImports is enabled#7560

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 3 commits intotypescript-eslint:mainfromjoshkel:restricted-side-effect-imports
Sep 8, 2023

Conversation

joshkel
Copy link
Contributor

PR Checklist

Overview

Fixes#7559 by changing the logic from#7379 from "allow imports if all specifiers are types (or if no specifiers exist)" to "allow imports if specifiers exist and all specifiers are types."

@netlify
Copy link

netlifybot commentedAug 29, 2023
edited
Loading

Deploy Preview fortypescript-eslint failed.

NameLink
🔨 Latest commitb61759b
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/64fa703738bf8800085f4afd

@nx-cloud
Copy link

nx-cloudbot commentedAug 29, 2023
edited
Loading

☁️ Nx Cloud Report

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


🟥 Failed Commands
nx build website
✅ Successfully ran 39 targets

Sent with 💌 fromNxCloud.

@joshkeljoshkel changed the titleDisallow side effect imports when allowTypeImports is enabledfix(eslint-plugin): Disallow side effect imports when allowTypeImports is enabledAug 29, 2023
@joshkeljoshkel changed the titlefix(eslint-plugin): Disallow side effect imports when allowTypeImports is enabledfix(eslint-plugin): [no-restricted-imports] disallow side effect imports when allowTypeImports is enabledAug 29, 2023
@codecov
Copy link

codecovbot commentedAug 29, 2023
edited
Loading

Codecov Report

Merging#7560 (b61759b) intomain (4f34d0b) willnot change coverage.
Report is 34 commits behind head on main.
The diff coverage is100.00%.

Additional details and impacted files
@@           Coverage Diff           @@##             main    #7560   +/-   ##=======================================  Coverage   87.23%   87.23%           =======================================  Files         387      387             Lines       13401    13401             Branches     3962     3962           =======================================  Hits        11690    11690             Misses       1327     1327             Partials      384      384
FlagCoverage Δ
unittest87.23% <100.00%> (ø)

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

Files ChangedCoverage Δ
...s/eslint-plugin/src/rules/no-restricted-imports.ts95.71% <100.00%> (ø)

... and1 file with indirect coverage changes

📢 Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=typescript-eslint).

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@joshkel!

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.

@bradzacherbradzacher added the bugSomething isn't working labelSep 8, 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.

for completeness - could we also get a valid test case forimport 'foo' with no banning config just to sanity-check that it still continues to pass?

otherwise looking good to me! great work!

@bradzacherbradzacher added the awaiting responseIssues waiting for a reply from the OP or another party labelSep 8, 2023
joshkeland others added2 commitsSeptember 7, 2023 20:46
@joshkel
Copy link
ContributorAuthor

for completeness - could we also get a valid test case forimport 'foo' with no banning config just to sanity-check that it still continues to pass?

@bradzacher Done (if I've understood correctly). Thanks for the review!

@bradzacherbradzacher removed the awaiting responseIssues waiting for a reply from the OP or another party labelSep 8, 2023
@bradzacher
Copy link
Member

thanks for fixing this!

joshkel reacted with thumbs up emoji

@bradzacherbradzacher merged commit4908905 intotypescript-eslint:mainSep 8, 2023
@joshkeljoshkel deleted the restricted-side-effect-imports branchSeptember 8, 2023 01:26
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsSep 16, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher requested changes

Assignees
No one assigned
Labels
bugSomething isn't working
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: [no-restricted-imports] allowTypeImports allows side effect imports
2 participants
@joshkel@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp