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
I'm writing typescript with explicit resource management. Current this feature is not supported (or maybe not enabled by default) by prettiers' default parser "typescript". Thus I switch to babel-ts parser which works fine with *.ts files. However, when I switch to *.vue files, error raises. After some examination, it seems that if I enable this plugin, the script block will fallback to use "typescript" parser instead of "babel-ts".
To Reproduce
Launch prettier ./test.vue, output
[error] ./test.vue: SyntaxError: This experimental syntax requires enabling the parser plugin: "explicitResourceManagement". (2:0)
Remove this plugin, relaunch previous command, output
Change *.ts parser to "typescript", relaunch, output
[error] ./test.ts: SyntaxError: This experimental syntax requires enabling the parser plugin: "explicitResourceManagement". (1:0)
just like the error above.
Expected behavior
I'm not sure if it is because this plugin use "typescript" parser underly, or because the parser of script block changed to "typescript" for some reason. But the vue script block should use the overrided parser, just like if this plugin isn't activated.
Your Environment
Describe the bug
I'm writing typescript with explicit resource management. Current this feature is not supported (or maybe not enabled by default) by prettiers' default parser "typescript". Thus I switch to babel-ts parser which works fine with *.ts files. However, when I switch to *.vue files, error raises. After some examination, it seems that if I enable this plugin, the script block will fallback to use "typescript" parser instead of "babel-ts".
To Reproduce
prettier ./test.vue
, outputtest.ts
prettier ./test.ts
, output*.ts
parser to "typescript", relaunch, outputjust like the error above.
Expected behavior
I'm not sure if it is because this plugin use "typescript" parser underly, or because the parser of script block changed to "typescript" for some reason. But the vue script block should use the overrided parser, just like if this plugin isn't activated.
Screenshots, code sample, etc
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: