Skip to content

Support import type attribute in TSImportType#16881

Merged
fisker merged 3 commits intoprettier:mainfrom
fisker:import-type-attribute
Feb 26, 2025
Merged

Support import type attribute in TSImportType#16881
fisker merged 3 commits intoprettier:mainfrom
fisker:import-type-attribute

Conversation

@fisker
Copy link
Copy Markdown
Member

@fisker fisker commented Nov 25, 2024

Description

typescript-eslint doesn't support it, but babel can parse it, let's wait for response from typescript-eslint/typescript-eslint#10394

Fixes #16072

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker fisker force-pushed the import-type-attribute branch 2 times, most recently from 0036573 to c750ec1 Compare November 25, 2024 16:58
Comment thread src/language-js/traverse/visitor-keys.evaluate.js Outdated
@fisker fisker mentioned this pull request Jan 20, 2025
4 tasks
@fisker fisker force-pushed the import-type-attribute branch from c750ec1 to 48eb1c6 Compare January 21, 2025 00:16
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jan 21, 2025

Open in Stackblitz

npm i https://pkg.pr.new/prettier@16881

commit: a513f3f

@fisker fisker force-pushed the import-type-attribute branch from 48eb1c6 to 58b8816 Compare February 24, 2025 22:16
@fisker fisker changed the title Support import type attribute with babel-ts parser Support import type attribute Feb 24, 2025
@fisker fisker changed the title Support import type attribute Support import type attribute in TSImportType Feb 24, 2025
@fisker fisker marked this pull request as ready for review February 24, 2025 22:18
@fisker fisker merged commit ff3b785 into prettier:main Feb 26, 2025
@fisker fisker deleted the import-type-attribute branch February 26, 2025 07:29
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.

Handle import attributes in TS import type

2 participants