Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.9k
feat(eslint-plugin): [no-import-type-side-effects] add rule to warn against runtime side effects withverbatimModuleSyntax#6394
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…th verbatimModuleSyntax
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. |
nx-cloudbot commentedJan 31, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
netlifybot commentedJan 31, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site settings. |
codecovbot commentedJan 31, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@## main #6394 +/- ##==========================================+ Coverage 91.37% 91.52% +0.15%========================================== Files 368 371 +3 Lines 12596 12649 +53 Branches 3709 3714 +5 ==========================================+ Hits 11509 11577 +68+ Misses 772 755 -17- Partials 315 317 +2
Flags with carried forward coverage won't be shown.Click here to find out more.
|
JoshuaKGoldberg left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Great! Nothing blocking from me, only suggestions (and most of them teeny nitpicks). ✨
packages/eslint-plugin/docs/rules/no-type-imports-with-verbatim-side-effects.md OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
packages/eslint-plugin/docs/rules/no-type-imports-with-verbatim-side-effects.md OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
packages/eslint-plugin/src/rules/no-type-imports-with-verbatim-side-effects.ts OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
packages/eslint-plugin/src/rules/no-type-imports-with-verbatim-side-effects.ts OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
packages/eslint-plugin/src/rules/no-type-imports-with-verbatim-side-effects.ts OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
verbatimModuleSyntaxCo-authored-by: Josh Goldberg <git@joshuakgoldberg.com>(cherry picked from commit3848375)
3848375 to3162d56CompareverbatimModuleSyntaxverbatimModuleSyntaxbradzacher commentedFeb 1, 2023
cc@DanielRosenwasser /@andrewbranch |
andrewbranch commentedFeb 1, 2023
Awesome, thank you! |
thenbe commentedFeb 7, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi. Just wondering if the following behavior in this new rule is intentional or working as intended. Currently, it's flagging allside-effect imports. Meanwhile, the docs describe the rule as:
It doesn't say anything about imports that have neither If this is intentional, and this rule does act on Repro:https://stackblitz.com/edit/repro-side-effect-lint?file=README.md |
JoshuaKGoldberg commentedFeb 7, 2023
@ambiguous48 pleasefile an issue using one of our issue templates (I'm guessing🐛 Report a Bug With a Rule). That'll help us address it more quickly, spotlight any missing info, and help us track which version(s) bugs & fixes appear in. Thanks! |
JoshuaKGoldberg commentedFeb 7, 2023
Ah, someone already did!#6431 Which is another point in favor of using the templates. They have useful links around searching for duplicate issues. |
bradzacher commentedFeb 7, 2023
Yup - as per our contributing guide, comments on closed PRs are not the way to ask questions or report bugs. https://typescript-eslint.io/contributing/issues#commenting As Josh pointed out - this bug has already been reported. |
PR Checklist
Overview
Pretty straight-forward rule to implement with a fixer.