quasarframework / quasar-template-pwa

[DEPRECATED] Quasar PWA Boilerplate / Starter kit
http://quasar-framework.org
MIT License
43 stars 6 forks source link

[discussion] replace eslint-plugin-html with eslint-plugin-vue? and add stylelint support? #5

Closed beeplin closed 6 years ago

beeplin commented 7 years ago

Hooraaaaaaaaaay~ Glad to see the pwa template finished!

I am working on the new v0.14 with both the default and the pwa templates. The webpacking in them are amazing, while I feel the linting part can be improved.

Linting for JS: now the vue core team provides eslint-plugin-vue in v3.0 beta, which is way more powerful than eslint-plugin-html. Some famous editor plugins like vetur are already using it.

Linting for CSS/stylus: I found the .stylintrc in the current template, but it only works for styles with lang="stylus". Nowadays stylelint is much more popular and powerful, and people of course could use both css and stylus in <style>s in quasar projects.

So I propose to make some enhancements on the linting part of the templates. I almost finished my own version of the new template. @rstoenescu if you are interested, I could make a PR in one or two days.

beeplin commented 7 years ago

And I have to mention that eslint-plugin-vue v3 is still in beta and does not support templates in pug and scripts in coffee. Other than that, I tried and found it working wonderfully.

So maybe the best way is to let users choose during quasar init which way they would like to go, either the old eslint-plugin-html or the new eslint-plugin-vue.

beeplin commented 7 years ago

And one more proposal: replace babel-preset-es2015 with babel-preset-env, which is recommended by the babel team: http://babeljs.io/docs/plugins/#presets-official-presets