Added script to check CSS files using stylelint.

This commit is contained in:
Joachim Bauch 2016-10-13 17:09:34 +02:00
parent 905557c8a2
commit 7a1b1dcd14
2 changed files with 23 additions and 0 deletions

12
.stylelintrc Normal file
View file

@ -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
}
}

11
run-stylelint.sh Executable file
View file

@ -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