Compact and efficient Stylelint configuration for my Vue project

Works for both *.vue and *.css

Kengo Hamasaki / hmsk
Hai-iro
1 min readJul 24, 2018

--

Installs

Processor: @mapbox/stylelint-processor-arbitrary-tags

  • To parse <style> section of *.vue files
  • Need to revoke no-empty-source rule to allow empty/missing <style> section
  • Need to configure fileFilterRegex: [/\.vue$/] to lint ordinal CSS files which don’t have <style> section

Base rules: stylelint-config-standard

  • Polished standard rule sets

Base rules: stylelint-config-recess-order

  • One of believable policies to sort CSS properties

Quick Installation

stylelint.config.js

--

--