Skip to content

fix: Default lang value for script blocks #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 27, 2023
Merged

Conversation

ackzell
Copy link
Contributor

@ackzell ackzell commented Apr 28, 2021

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.

Some Meteor plugins require to have a `lang="js"` attribute (see https://github.com/Hernanm0g/meteor-vuetify-loader#installation)
But in turn, Vetur does not support this:  https://github.com/vuejs/vetur/blob/master/docs/guide/highlighting.md#syntax-highlighting

(Vetur doc talks about highlighting syntax, but formatting code using Vetur will not work if there is a `lang="js"` for me)
@ackzell
Copy link
Contributor Author

ackzell commented Mar 30, 2022

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. ☹️

@Akryum Akryum changed the title Default lang value for script blocks fix: Default lang value for script blocks Apr 27, 2023
@Akryum Akryum merged commit 7646adc into meteor-vue:master Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants