Whether can support html or vue script tag
All in title.
Yeah, I got this Language is not valid as well (for .vue file).
And I already put plugin into .eslintrc.js
plugins: [
'html','vue'
],
So the extension is .vue are there other extensions?
I don't know if .html is a good plan though... 🤔
there are great variety file extension for users , for example I use .vue (Vue) .blade.php (Laravel Blade) but some may not. I suggest add a config for user to define the VALID_LANG
what I tried
- copy the js in .vue into a standalone .js file then use the extension , worked well.
- clone this repo and change
const VALID_LANG: DocumentSelector = ['javascript', 'javascriptreact', 'html', 'vue'];, then vsce package and install . worked in selecting the js code and prettier. but reportedprettier-eslint [ERROR]: prettier formatting failed due to a prettier errorwhile using the prettier to the .vue document (without selecting)
The reason it errors, is because there are multiple 'languages' in the file. So prettier takes in the whole file (or selection) but it sees html tags like