Added stylelint + config

This commit is contained in:
Andrey Okonetchnikov 2016-10-05 12:10:25 +02:00
parent b3b7e5dd16
commit 0ccaad5822
2 changed files with 50 additions and 2 deletions

41
.stylelintrc Normal file
View File

@ -0,0 +1,41 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-css-modules"
],
"plugins": [
"stylelint-declaration-block-order"
],
"rules": {
"at-rule-no-vendor-prefix": true,
"function-url-no-scheme-relative": true,
"function-url-quotes": "always",
"max-nesting-depth": 3,
"media-feature-name-no-vendor-prefix": true,
"property-no-vendor-prefix": true,
"selector-attribute-quotes": "always",
"selector-no-attribute": true,
"selector-no-combinator": true,
"selector-no-qualifying-type": true,
"selector-no-id": true,
"selector-no-type": true,
"selector-no-universal": true,
"selector-no-vendor-prefix": true,
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": true,
"selector-root-no-composition": true,
"selector-type-no-unknown": true,
"string-quotes": "single",
"value-no-vendor-prefix": true,
"stylelint-disable-reason": "always-after",
"plugin/declaration-block-order": [
"custom-properties",
"dollar-variables",
"declarations",
"rules",
"at-rules"
]
}
}

View File

@ -10,8 +10,11 @@
"build": "webpack --config webpack.config.js",
"storybook": "start-storybook -p 9001",
"storybook-build": "build-storybook -o dist",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"lint": "npm run lint:js & npm run lint:css",
"lint:js": "eslint .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:css": "stylelint 'src/**/*.css'",
"lint:css:fix": "stylelint **/*.css",
"lint:staged": "lint-staged"
},
"lint-staged": {
@ -72,6 +75,10 @@
"redux-thunk": "^1.0.3",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.0",
"stylelint": "^7.3.1",
"stylelint-config-css-modules": "^0.1.0",
"stylelint-config-standard": "^13.0.2",
"stylelint-declaration-block-order": "^0.1.0",
"url-loader": "^0.5.7",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.15.1",