summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoachim Bauch <bauch@struktur.de>2016-10-13 17:09:34 +0200
committerJoachim Bauch <bauch@struktur.de>2016-10-14 14:08:45 +0200
commit7a1b1dcd144cde2ae0e7ee9bba9de51ba516dc96 (patch)
treed9ab4ef6ae7ad3dc12634120508670635b61d363
parent905557c8a2f7ba42e29971b09ac0033f839c1a46 (diff)
Added script to check CSS files using stylelint.
-rw-r--r--.stylelintrc12
-rwxr-xr-xrun-stylelint.sh11
2 files changed, 23 insertions, 0 deletions
diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000000000..b0cd7d69b
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,12 @@
+{
+ "rules": {
+ "media-feature-name-no-unknown": true,
+ "property-no-unknown": true,
+ "selector-pseudo-class-no-unknown": true,
+ "selector-pseudo-element-no-unknown": true,
+ "selector-type-no-unknown": true,
+ "string-no-newline": true,
+ "unit-case": "lower",
+ "unit-no-unknown": true
+ }
+}
diff --git a/run-stylelint.sh b/run-stylelint.sh
new file mode 100755
index 000000000..974ef67d1
--- /dev/null
+++ b/run-stylelint.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+STYLELINT=$(which stylelint || true)
+if [ -z "$STYLELINT" ]; then
+ echo "Can't find command \"stylelint\" in $PATH"
+ exit 1
+fi
+
+echo Checking stylesheets with $STYLELINT ...
+find -name "*.css" -print0 | xargs -0 $STYLELINT