From 7a1b1dcd144cde2ae0e7ee9bba9de51ba516dc96 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 13 Oct 2016 17:09:34 +0200 Subject: [PATCH] Added script to check CSS files using stylelint. --- .stylelintrc | 12 ++++++++++++ run-stylelint.sh | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .stylelintrc create mode 100755 run-stylelint.sh 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