Compact and efficient Stylelint configuration for my Vue project
Works for both *.vue and *.css
Published in
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
$ npm i -D stylelint stylelint-config-standard stylelint-config-recess-order @mapbox/stylelint-processor-arbitrary-tags$ curl -O https://gist.githubusercontent.com/hmsk/cfe3ce464cd2b7febcfabc8c88ac8e48/raw/9256f2324fd5eea052c4879650df8d733053df8d/stylelint.config.js$ node_modules/.bin/stylelint **/*.vue **/*.css