Skip to content

Commit 62620a3

Browse files
committed
Build: Update grunt-jscs to latest, use exceptions to improve coverage
Closes gh-1506
1 parent fac517e commit 62620a3

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

Gruntfile.js

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ var
7676
"dist/jquery-ui.min.js"
7777
]
7878
},
79-
component = grunt.option( "component" ) || "**";
79+
component = grunt.option( "component" ) || "**",
80+
81+
jscsBad = [ "ui/tabs.js", "ui/slider.js", "ui/selectable.js", "ui/resizable.js", "ui/mouse.js", "ui/menu.js", "ui/effect*.js", "ui/droppable.js", "ui/draggable.js", "ui/button.js", "ui/datepicker.js", "ui/sortable.js" ];
8082

8183
function mapMinFile( file ) {
8284
return "dist/" + file.replace( /ui\//, "minified/" );
@@ -158,12 +160,30 @@ grunt.initConfig({
158160
dest: "dist/jquery-ui.css"
159161
}
160162
},
163+
164+
// Remove the requireSpacesInsideParentheses override once everything is fixed
161165
jscs: {
162-
// datepicker and sortable are getting rewritten, ignore until that's done
163-
ui: [ "ui/*.js", "!ui/datepicker.js", "!ui/sortable.js" ],
164-
// TODO enable this once we have a tool that can auto format files
165-
// tests: "tests/unit/**/*.js",
166-
grunt: [ "Gruntfile.js", "build/tasks/*.js" ]
166+
"ui-good": [ "ui/*.js" ].concat( jscsBad.map( function( file ) {
167+
return "!" + file;
168+
} ) ),
169+
"ui-bad": {
170+
options: {
171+
requireSpacesInsideParentheses: null
172+
},
173+
src: jscsBad
174+
},
175+
tests: {
176+
options: {
177+
requireSpacesInsideParentheses: null
178+
},
179+
src: "tests/unit/**/*.js"
180+
},
181+
grunt: {
182+
options: {
183+
requireSpacesInsideParentheses: null
184+
},
185+
src: [ "Gruntfile.js", "build/tasks/*.js" ]
186+
}
167187
},
168188
uglify: minify,
169189
htmllint: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"grunt-esformatter": "0.2.0",
6969
"grunt-git-authors": "2.0.0",
7070
"grunt-html": "1.0.0",
71-
"grunt-jscs": "0.6.2",
71+
"grunt-jscs": "1.5.0",
7272
"load-grunt-tasks": "0.3.0",
7373
"rimraf": "2.1.4",
7474
"testswarm": "1.1.0"

0 commit comments

Comments
 (0)