diff options
-rw-r--r-- | .stylelintrc | 12 | ||||
-rwxr-xr-x | run-stylelint.sh | 11 |
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 |