Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Commit

Permalink
build: add stylelint
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Dec 15, 2018
1 parent 1f979d5 commit b1f5d60
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"src/**/*.js|*.config.js": ["eslint --fix", "git add"]
"linters": {
"*.js": ["eslint --fix", "git add"],
"*.{css,scss,html}": ["stylelint --fix", "git add"]
},
"ignore": ["{dist,docs}/**/*.js", "*.min.*"]
}
10 changes: 10 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-order"
],
"rules": {
"no-descending-specificity": null,
"order/properties-alphabetical-order": true
}
}
5 changes: 3 additions & 2 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ module.exports = {
'postcss-header': {
header: rollupConfig.output[0].banner,
},
autoprefixer: {},
stylefmt: {},
stylelint: {
fix: true,
},
},
};

0 comments on commit b1f5d60

Please sign in to comment.