diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 0000000000..1d86a41f98 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,3 @@ +{ + "extends": "stylelint-config-ckeditor5" +} diff --git a/package.json b/package.json index efee73799e..a6b12e2f4f 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "eslint-config-ckeditor5": "^2.0.0", "husky": "^1.3.1", "lint-staged": "^7.0.0", + "stylelint": "^11.1.1", "postcss-loader": "^3.0.0", "raw-loader": "^3.1.0", "style-loader": "^1.0.0", @@ -72,11 +73,15 @@ "scripts": { "build": "webpack --mode production", "lint": "eslint --quiet '**/*.js'", + "stylelint": "stylelint --quiet --allow-empty-input 'theme/**/*.css' 'docs/**/*.css'", "preversion": "npm run build; if [ -n \"$(git status src/ckeditor.js build/ --porcelain)\" ]; then git add -u src/ckeditor.js build/ && git commit -m 'Internal: Build.'; fi" }, "lint-staged": { "**/*.js": [ "eslint --quiet" + ], + "**/*.css": [ + "stylelint --quiet --allow-empty-input" ] }, "eslintIgnore": [