Skip to content
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

Enforce type imports #4661

Merged
merged 2 commits into from Oct 11, 2022
Merged

Enforce type imports #4661

merged 2 commits into from Oct 11, 2022

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

This will add an auto-fixable ESLint rule to enforce TypeScript type imports over regular imports when possible.

@github-actions
Copy link

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#type-imports

or load it into the REPL:
https://rollupjs.org/repl/?pr=4661

@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Merging #4661 (962e1cd) into master (4572e46) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4661   +/-   ##
=======================================
  Coverage   99.06%   99.06%           
=======================================
  Files         214      214           
  Lines        7554     7554           
  Branches     2096     2096           
=======================================
  Hits         7483     7483           
  Misses         23       23           
  Partials       48       48           
Impacted Files Coverage Δ
src/Bundle.ts 100.00% <ø> (ø)
src/Chunk.ts 100.00% <ø> (ø)
src/ExternalChunk.ts 100.00% <ø> (ø)
src/Module.ts 100.00% <ø> (ø)
src/ModuleLoader.ts 100.00% <ø> (ø)
src/ast/NodeInteractions.ts 100.00% <ø> (ø)
src/ast/nodes/ArrayExpression.ts 100.00% <ø> (ø)
src/ast/nodes/ArrayPattern.ts 100.00% <ø> (ø)
src/ast/nodes/ArrowFunctionExpression.ts 94.73% <ø> (ø)
src/ast/nodes/AssignmentExpression.ts 100.00% <ø> (ø)
... and 70 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lukastaegert lukastaegert merged commit 5c74cd9 into master Oct 11, 2022
@lukastaegert lukastaegert deleted the type-imports branch October 11, 2022 19:51
@rollup-bot
Copy link
Collaborator

This PR has been released as part of rollup@3.0.1. You can test it via npm install rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants