Closed bbenoist closed 4 years ago
I've created an issue upstream ( https://github.com/renke/import-sort/issues/101 ) as I had the same problem with import-sort-cli
.
That's for that, I rather assumed that that would be the source of the issue but hadn't had time to check it out.
Fixed with adding "parser": "typescript"
in my package.json config:
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module",
"parser": "typescript"
}
}
interesting, I wonder why I didn't need this. Either way, I'll update the docs to reflect this as a possible option.
Thank you for coming back with a solution.
Hi, thanks for your work!
I have an error with one of my TypeScript project. I've made a simple project reproducing the issue: bbenoist/prettier-plugin-import-sort-arg-decorator-bug
The following valid TypeScript code:
Gives this error (full log):
Before adding prettier-plugin-import-sort and import-sort-style-module, prettier didn't complain about the function argument decorator so I suppose that there is something wrong on this side...