Closed skycoop closed 1 month ago
Ah ok I found that adding explicitResourceManagement
to importOrderParserPlugins
fixes it. I half wonder if the error message could be improved to suggest this?
Glad you figured it out. Feel free to try improving the error message, but it's coming from babel, so I think you'd need to make a PR there. It should probably at least be something like This experimental syntax requires enabling the _babel_ parser plugin ...
Your Environment
Describe the bug
When using keywords from Explicit Resource Management (i.e.
using
/await using
), this plugin causes prettier to fail.To Reproduce
Use
using
/await using
in any file.Expected behavior
No error
Screenshots, code sample, etc
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
Error log
Contribute to @ianvs/prettier-plugin-sort-imports