summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Carver2017-02-13 14:15:18 (GMT)
committerMark Carver2017-02-13 14:15:18 (GMT)
commit1aa8a1426ababbe3fd13627fb198778b16096241 (patch)
treee2dc2f5528236e0adac77e7e18e34264c8d39a4a
parent2750b196c9149b66abb31edfc08d43d65e3d5d72 (diff)
Issue #2831589 by markcarver: Add grunt-contrib-csslint to maintainer workflow
-rw-r--r--.csslintrc38
-rw-r--r--grunt/compile.js6
-rw-r--r--grunt/config/csslint.js13
-rw-r--r--package.json1
4 files changed, 56 insertions, 2 deletions
diff --git a/.csslintrc b/.csslintrc
new file mode 100644
index 0000000..b4e65db
--- /dev/null
+++ b/.csslintrc
@@ -0,0 +1,38 @@
+{
+ "adjoining-classes": false,
+ "box-sizing": true,
+ "box-model": false,
+ "bulletproof-font-face": true,
+ "compatible-vendor-prefixes": true,
+ "display-property-grouping": false,
+ "duplicate-background-images": true,
+ "duplicate-properties": true,
+ "empty-rules": true,
+ "errors": true,
+ "fallback-colors": false,
+ "floats": false,
+ "font-sizes": true,
+ "font-faces": true,
+ "gradients": true,
+ "ids": false,
+ "import": true,
+ "important": false,
+ "known-properties": true,
+ "outline-none": false,
+ "order-alphabetical": false,
+ "overqualified-elements": false,
+ "qualified-headings": false,
+ "regex-selectors": true,
+ "rules-count": true,
+ "selector-max": true,
+ "selector-max-approaching": true,
+ "shorthand": true,
+ "star-property-hack": true,
+ "text-indent": true,
+ "underscore-property-hack": true,
+ "unique-headings": false,
+ "universal-selector": true,
+ "unqualified-attributes": true,
+ "vendor-prefix": false,
+ "zero-units": true
+}
diff --git a/grunt/compile.js b/grunt/compile.js
index 4b3937a..7af2ab7 100644
--- a/grunt/compile.js
+++ b/grunt/compile.js
@@ -146,7 +146,9 @@ module.exports = function (grunt) {
var subtask = (dev ? 'dev' : 'css');
grunt.task.run([
'clean:' + subtask,
- 'compile:overrides'
+ 'compile:overrides',
+ 'csslint:' + subtask
]);
});
-}
+
+};
diff --git a/grunt/config/csslint.js b/grunt/config/csslint.js
new file mode 100644
index 0000000..1505ff6
--- /dev/null
+++ b/grunt/config/csslint.js
@@ -0,0 +1,13 @@
+module.exports = function () {
+ return {
+ options: {
+ csslintrc: '.csslintrc'
+ },
+ css: {
+ src: ['css/**/*.css']
+ },
+ dev: {
+ src: ['css/<%= latestVersion %>/overrides.min.css']
+ }
+ };
+};
diff --git a/package.json b/package.json
index 5ad97d4..4ed1fe4 100644
--- a/package.json
+++ b/package.json
@@ -7,6 +7,7 @@
"glob": "^5.0.14",
"grunt": "^0.4.5",
"grunt-contrib-clean": "^0.6.0",
+ "grunt-contrib-csslint": "^2.0.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-githooks": "^0.3.1",
"inquirer": "^0.9.0",