-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [no-import-type-side-effects] add rule to warn against runtime side effects with verbatimModuleSyntax
#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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
|
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
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/docs/rules/no-type-imports-with-verbatim-side-effects.md
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/src/rules/no-type-imports-with-verbatim-side-effects.ts
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/src/rules/no-type-imports-with-verbatim-side-effects.ts
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/src/rules/no-type-imports-with-verbatim-side-effects.ts
Outdated
Show resolved
Hide resolved
verbatimModuleSyntax
Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com> (cherry picked from commit 3848375)
3848375
to
3162d56
Compare
verbatimModuleSyntax
verbatimModuleSyntax
cc @DanielRosenwasser / @andrewbranch |
Awesome, thank you! |
Hi. Just wondering if the following behavior in this new rule is intentional or working as intended. Currently, it's flagging all side-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 |
@ambiguous48 please file 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! |
Ah, someone already did! #6431 Which is another point in favor of using the templates. They have useful links around searching for duplicate issues. |
Yup - as per our contributing guide, comments on closed PRs are not the way to ask questions or report bugs. As Josh pointed out - this bug has already been reported. |
PR Checklist
Overview
Pretty straight-forward rule to implement with a fixer.