Closed GiancarlosIO closed 12 months ago
I notice you're importing Card but also defining a const named Card as well. Does the error resolve if you rename one of those?
@IanVS OMG, you are right!!!
Kinda disappointed because ts doesn't throw an error here 🤔
Anyways, that solves the error
Thanks!!
Your Environment
Describe the bug
There is an error:
when trying to format this file.
The thing is that If I change this import from:
To:
then Prettier works without any problem 🤔
To Reproduce
git clone https://github.com/GiancarlosIO/vscode-prettier-bug.git
git checkout plugin-sort-bug
pnpm install
pnpm format
Expected behavior
It should format without errors
Screenshots, code sample, etc
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
Error log
Error from prettier cli:
Error from vscode prettier extension
Contribute to @ianvs/prettier-plugin-sort-imports