Open AnotiaWang opened 1 year ago
I think this issue https://github.com/trivago/prettier-plugin-sort-imports/issues/276 is related, it's due to the $$
being a special replacement group in a call to "".replace()
, which this plugin uses in pre-processing vue code.
I've submitted a fix PR which should address this issue
Your Environment
Describe the bug
I'm using Vue with the Reactivity Transform macros. There's a
$$()
macro to keep reactivity of refs when passing them to functions. However this plugin always tries to rename$$()
to$()
, which leads to Vue throwing an error$ can only be used as the initializer of a variable declaration
.To Reproduce
ref
for the component.Error log
[plugin:commonjs] $ can only be used as the initializer of a variable declaration
Contribute to @trivago/prettier-plugin-sort-imports