vue-meteor icon indicating copy to clipboard operation
vue-meteor copied to clipboard

Default `lang` value for `script` blocks

Open ackzell opened this issue 4 years ago • 1 comments

Some Meteor plugins require to have a lang="js" attribute (see https://github.com/Hernanm0g/meteor-vuetify-loader#installation) image

But in turn, Vetur does not support this: https://github.com/vuejs/vetur/blob/master/docs/guide/highlighting.md#syntax-highlighting

image

Vetur doc talks about highlighting syntax, but formatting code using Vetur will not work if there is a lang="js" for me

TL;DR: Figured this being the middle ground would be a good spot to make both things work (auto imports for meteor-vuetify-loader as well as code formatting in VScode using Vetur.

ackzell avatar Apr 28 '21 18:04 ackzell

I am still very much using this setup and my best solution so far is to

  • remove the lang="js" attribute from the script tag in my code when I want to let the formatter kick in
  • add it back if I want my app to actually work

Alternatively

  • run the formatter (Prettier) right before committing my changes via an npm task. Which is not really a great DX to be honest. ☹️

ackzell avatar Mar 30 '22 01:03 ackzell