Add styled components linting.

This commit is contained in:
Filip Barl
2018-03-21 16:01:15 +01:00
parent 631077b68a
commit 109bc21b57
5 changed files with 809 additions and 16 deletions
+19
View File
@@ -0,0 +1,19 @@
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-styled-components",
"stylelint-config-recommended",
],
"rules": {
"block-no-empty": null,
"color-named": "never",
"color-no-hex": true,
"function-blacklist": ["/^rgb/", "/^hsl/"],
"no-empty-source": null,
"no-duplicate-selectors": null,
"property-no-vendor-prefix": [true, {
"ignoreProperties": ["tab-size", "hyphens"],
}],
"selector-type-no-unknown": null,
},
}
+1 -1
View File
@@ -3,4 +3,4 @@ WORKDIR /home/weave
COPY package.json yarn.lock /home/weave/
ENV NPM_CONFIG_LOGLEVEL=warn NPM_CONFIG_PROGRESS=false
RUN yarn --pure-lockfile
COPY webpack-common.js webpack.local.config.js webpack.production.config.js server.js .babelrc .eslintrc .eslintignore .sass-lint.yml /home/weave/
COPY webpack-common.js webpack.local.config.js webpack.production.config.js server.js .babelrc .eslintrc .eslintignore .stylelintrc .sass-lint.yml /home/weave/
+6 -1
View File
@@ -83,6 +83,11 @@
"sass-loader": "6.0.6",
"sasslint-webpack-plugin": "^1.0.4",
"style-loader": "0.19.0",
"stylelint": "9.1.3",
"stylelint-config-recommended": "2.1.0",
"stylelint-config-styled-components": "0.1.1",
"stylelint-custom-processor-loader": "0.4.0",
"stylelint-processor-styled-components": "1.3.1",
"url": "0.11.0",
"url-loader": "0.6.2",
"webpack": "2.4.1",
@@ -99,7 +104,7 @@
"start-production": "NODE_ENV=production node server.js",
"test": "jest",
"coveralls": "cat coverage/lcov.info | coveralls",
"lint": "eslint app server.js && sass-lint -v",
"lint": "eslint app server.js && stylelint src && sass-lint -v",
"clean": "rm build/app.js",
"noprobe": "../scope stop && ../scope launch --no-probe --app.window 8760h",
"loadreport": "yarn run noprobe && sleep 1 && curl -X POST -H \"Content-Type: application/json\" http://$BACKEND_HOST/api/report -d"
+4 -1
View File
@@ -94,7 +94,10 @@ module.exports = {
{
test: /\.js$/,
exclude: /node_modules|vendor/,
loader: 'eslint-loader',
loaders: [
'eslint-loader',
'stylelint-custom-processor-loader',
],
enforce: 'pre'
},
{
+779 -13
View File
File diff suppressed because it is too large Load Diff