]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Add stylelint checks for CSS 2837/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 6 Apr 2019 17:47:52 +0000 (20:47 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 6 Apr 2019 17:59:31 +0000 (20:59 +0300)
and embedded styles

.drone.yml
.stylelintrc.json [new file with mode: 0644]
interface/css/rspamd.css
package.json

index 2d01911ba10fd1db0a7dd4ae92875e894ce7942d..d28b235addf6fa168e28288c42cf96c52229ea2f 100644 (file)
@@ -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 (file)
index 0000000..b25642b
--- /dev/null
@@ -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
+    }
+}
index 7615b326fa7242e7444747e96d6e2c0447ebbafe..bc43668fe5b60f19af4d5c8d1e7e8c6440be12d1 100644 (file)
@@ -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;
index 75e42eff7b49babef28b0033ddfdd56cf33faf72..9bbf7290f4698f3c1660a5fde8450a98485fd8aa 100644 (file)
@@ -1,6 +1,8 @@
 {
     "devDependencies": {
-        "eslint": "*"
+        "eslint": "*",
+        "stylelint": "*",
+        "stylelint-config-standard": "*"
     },
     "eslintIgnore": [
         "*.min.js",