commit fbffe54: [Test] Add stylelint checks for CSS
Alexander Moisseev
moiseev at mezonplus.ru
Sun Apr 7 08:21:11 UTC 2019
Author: Alexander Moisseev
Date: 2019-04-06 20:47:52 +0300
URL: https://github.com/rspamd/rspamd/commit/fbffe544a6775f14d682847833b88eb3680e2dfd (refs/pull/2837/head)
[Test] Add stylelint checks for CSS
and embedded styles
---
.drone.yml | 4 ++++
.stylelintrc.json | 17 +++++++++++++++++
interface/css/rspamd.css | 1 +
package.json | 4 +++-
4 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 2d01911ba..d28b235ad 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -61,6 +61,10 @@ pipeline:
- npm install
- ./node_modules/.bin/eslint -v
- ./node_modules/.bin/eslint ./
+ # Run stylelint checks
+ - ./node_modules/.bin/stylelint -v
+ - npm show stylelint-config-standard version
+ - ./node_modules/.bin/stylelint ./**/*.css ./**/*.html ./**/*.js
# Run checks on perl source using tidyall
perl-tidyall:
diff --git a/.stylelintrc.json b/.stylelintrc.json
new file mode 100644
index 000000000..b25642b8f
--- /dev/null
+++ b/.stylelintrc.json
@@ -0,0 +1,17 @@
+{
+ "extends": "stylelint-config-standard",
+ "ignoreFiles": [
+ "**/*.min.css",
+ "**/*.min.js",
+ "interface/css/d3evolution.css",
+ "interface/css/nprogress.css"
+ ],
+ "rules": {
+ "at-rule-empty-line-before": null,
+ "color-hex-length": null,
+ "comment-empty-line-before": null,
+ "indentation": 4,
+ "number-leading-zero": null,
+ "rule-empty-line-before": null
+ }
+}
diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css
index 7615b326f..bc43668fe 100644
--- a/interface/css/rspamd.css
+++ b/interface/css/rspamd.css
@@ -214,6 +214,7 @@ table#symbolsTable input[type="number"] {
background-image: -ms-linear-gradient(top, #fdfdfd 0%, #eaeaea 100%);
background-image: -o-linear-gradient(top, #fdfdfd 0%, #eaeaea 100%);
background-image: -linear-gradient(top, #fdfdfd 0%, #eaeaea 100%);
+ /* stylelint-disable-next-line function-name-case */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdfdfd', endColorstr='#eaeaea', GradientType=0); /* IE6-9 */
border-bottom: 1px solid #cdcdcd;
height: 36px;
diff --git a/package.json b/package.json
index 75e42eff7..9bbf7290f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,8 @@
{
"devDependencies": {
- "eslint": "*"
+ "eslint": "*",
+ "stylelint": "*",
+ "stylelint-config-standard": "*"
},
"eslintIgnore": [
"*.min.js",
More information about the Commits
mailing list