Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit c651bda

Browse files
committed
Build: Add csslint and csscomb
Closes gh-8172
1 parent 1b2746f commit c651bda

File tree

6 files changed

+64
-0
lines changed

6 files changed

+64
-0
lines changed

.csscomb.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"remove-empty-rulesets": true,
3+
"always-semicolon": true,
4+
"color-case": "lower",
5+
"block-indent": "\t",
6+
"color-shorthand": true,
7+
"element-case": "lower",
8+
"eof-newline": true,
9+
"leading-zero": false,
10+
"quotes": "double",
11+
"sort-order-fallback": "abc",
12+
"space-before-colon": "",
13+
"space-after-colon": " ",
14+
"space-before-combinator": " ",
15+
"space-after-combinator": " ",
16+
"space-between-declarations": "\n",
17+
"space-before-opening-brace": " ",
18+
"space-after-opening-brace": "\n",
19+
"space-after-selector-delimiter": "\n",
20+
"space-before-selector-delimiter": "",
21+
"space-before-closing-brace": "\n",
22+
"strip-spaces": true,
23+
"unitless-zero": true
24+
}

.csslintrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"adjoining-classes": false,
3+
"box-model": false,
4+
"box-sizing": false,
5+
"compatible-vendor-prefixes": false,
6+
"duplicate-background-images": false,
7+
"import": false,
8+
"important": false,
9+
"outline-none": false,
10+
"overqualified-elements": false,
11+
"text-indent": false,
12+
13+
// These are not ideal but needed for current theme
14+
"qualified-headings": false,
15+
"regex-selectors": false,
16+
"unqualified-attributes": false,
17+
"universal-selector": false,
18+
"unique-headings": false,
19+
"vendor-prefix": false
20+
}

build/tasks/alias.js

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ grunt.registerTask( "build:js", [
3030
] );
3131
grunt.registerTask( "build:css", [
3232
"cssbuild",
33+
"csslint",
3334
"cssmin"
3435
] );
3536
grunt.registerTask( "build:demos", [

build/tasks/options/csscomb.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
structure: {
3+
options: {
4+
config: ".csscomb.json"
5+
},
6+
files: [{
7+
expand: true,
8+
src: [ 'css/structure/*.css' ]
9+
}]
10+
}
11+
};

build/tasks/options/csslint.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
options: {
3+
csslintrc: ".csslintrc"
4+
},
5+
src: [ "css/**/*.css" ]
6+
};

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@
3636
"grunt-contrib-concat": "0.3.0",
3737
"grunt-contrib-connect": "0.3.0",
3838
"grunt-contrib-copy": "0.4.1",
39+
"grunt-contrib-csslint": "0.4.0",
3940
"grunt-contrib-cssmin": "0.6.1",
4041
"grunt-contrib-jshint": "0.6.3",
4142
"grunt-contrib-requirejs": "0.4.1",
4243
"grunt-contrib-uglify": "0.2.6",
4344
"grunt-coveralls": "0.3.0",
45+
"grunt-csscomb": "1.2.1",
4446
"grunt-esformatter": "1.0.1",
4547
"grunt-git-authors": "2.0.0",
4648
"grunt-hash-manifest": "0.5.3",

0 commit comments

Comments
 (0)