Webpack: Any plan for StyleLint?

Created on 4 Aug 2017  路  5Comments  路  Source: vuejs-templates/webpack

I have a new parser for PostCSS/StyleLint, postcss-html.
features about vue:

  • Compatible with vue component
  • Support automatically fixes of StyleLint.
  • Support syntax definded in <style lang="*">
  • Syntax detection by file extensions for non vue component file.

Usage:

stylelint "**/*.{vue,html,css,sss,less,scss,sass}" --custom-syntax postcss-html

Related:

  • #154
  • vuejs/vue-loader#303
  • stylelint/stylelint#2975

/CC @dan-gamble

intend to implement

Most helpful comment

A temporary solution is separate your html, (s)css and js files to let PostCSS's plugin stylelint to process.

I used another solution, postcss-html for stylelint CLI

shell stylelint "**/*.{vue,htm,html,css,sss,less,scss,sass}" --custom-syntax postcss-html

All 5 comments

Stylelint is used by Facebook, Wikipedia and GitHub.

create-react-app will support it in 2.0.

Right now it is the most popular CSS linter.

Stylelint is great! I've been adding it to all my frontend projects. I'd love to see support out of the box in the template.

A temporary solution is separate your html, (s)css and js files to let PostCSS's plugin stylelint to process.

An elegant way to separate these file is using vue-separate-files-loader.

A temporary solution is separate your html, (s)css and js files to let PostCSS's plugin stylelint to process.

I used another solution, postcss-html for stylelint CLI

shell stylelint "**/*.{vue,htm,html,css,sss,less,scss,sass}" --custom-syntax postcss-html

@gucong3000 it鈥榮 nice to deal with it.

Was this page helpful?
0 / 5 - 0 ratings