You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When formatting Typescript, prettier reports there is a missing semicolon in the middle of typecasting a generic function. Specifically, it reports that there should be a semicolon before the as in this code:
functionfunc<T>(){};constx=func<number>asany;
This error does not happen if the @trivago/prettier-plugin-sort-imports plugin is not included.
To Reproduce
Run prettier on the above code snippet with @trivago/prettier-plugin-sort-imports installed.
Your Environment
Describe the bug
When formatting Typescript, prettier reports there is a missing semicolon in the middle of typecasting a generic function. Specifically, it reports that there should be a semicolon before the
as
in this code:This error does not happen if the
@trivago/prettier-plugin-sort-imports
plugin is not included.To Reproduce
Run prettier on the above code snippet with
@trivago/prettier-plugin-sort-imports
installed.Expected behavior
Prettier should output no errors.
Screenshots, code sample, etc
Minimal repro -
repro.ts
:Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
Error log
Contribute to @trivago/prettier-plugin-sort-imports
The text was updated successfully, but these errors were encountered: