]> source.dussan.org Git - jquery-ui.git/commitdiff
Build: Update grunt-jscs to latest, use exceptions to improve coverage
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 18 Mar 2015 12:25:51 +0000 (13:25 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 18 Mar 2015 12:50:56 +0000 (13:50 +0100)
Closes gh-1506

Gruntfile.js
package.json

index d91dedb9bc4d918350df8dd9c7889dfda771fb8f..62b2839602e1cdffd9d92a5cb8ed3f2644e0db0f 100644 (file)
@@ -76,7 +76,9 @@ var
                        "dist/jquery-ui.min.js"
                ]
        },
-       component = grunt.option( "component" ) || "**";
+       component = grunt.option( "component" ) || "**",
+
+       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" ];
 
 function mapMinFile( file ) {
        return "dist/" + file.replace( /ui\//, "minified/" );
@@ -158,12 +160,30 @@ grunt.initConfig({
                        dest: "dist/jquery-ui.css"
                }
        },
+
+       // Remove the requireSpacesInsideParentheses override once everything is fixed
        jscs: {
-               // datepicker and sortable are getting rewritten, ignore until that's done
-               ui: [ "ui/*.js", "!ui/datepicker.js", "!ui/sortable.js" ],
-               // TODO enable this once we have a tool that can auto format files
-               // tests: "tests/unit/**/*.js",
-               grunt: [ "Gruntfile.js", "build/tasks/*.js" ]
+               "ui-good": [ "ui/*.js" ].concat( jscsBad.map( function( file ) {
+                       return "!" + file;
+               } ) ),
+               "ui-bad": {
+                       options: {
+                               requireSpacesInsideParentheses: null
+                       },
+                       src: jscsBad
+               },
+               tests: {
+                       options: {
+                               requireSpacesInsideParentheses: null
+                       },
+                       src: "tests/unit/**/*.js"
+               },
+               grunt: {
+                       options: {
+                               requireSpacesInsideParentheses: null
+                       },
+                       src: [ "Gruntfile.js", "build/tasks/*.js" ]
+               }
        },
        uglify: minify,
        htmllint: {
index b7ab3780dcded073d77c388d3421a45938ade580..3058cb833407916ef2f9ddb577e1be64d133221c 100644 (file)
@@ -68,7 +68,7 @@
                "grunt-esformatter": "0.2.0",
                "grunt-git-authors": "2.0.0",
                "grunt-html": "1.0.0",
-               "grunt-jscs": "0.6.2",
+               "grunt-jscs": "1.5.0",
                "load-grunt-tasks": "0.3.0",
                "rimraf": "2.1.4",
                "testswarm": "1.1.0"