aboutsummaryrefslogtreecommitdiffstats
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2013-10-10 18:42:21 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2013-11-13 19:20:16 +0100
commitc462e66f5d2c3da30879e38649e81d34bb7d2587 (patch)
treea7d38d0274f6bd38cdbbd314307f80a991fd83c8 /Gruntfile.js
parent0e192979d0401c8cfe889b116fffc43cc85bb9fa (diff)
downloadjquery-ui-c462e66f5d2c3da30879e38649e81d34bb7d2587.tar.gz
jquery-ui-c462e66f5d2c3da30879e38649e81d34bb7d2587.zip
Build: Add jscs task for code style checking
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index e5ee423f1..63ff1cf39 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -105,6 +105,7 @@ grunt.loadNpmTasks( "grunt-contrib-uglify" );
grunt.loadNpmTasks( "grunt-contrib-concat" );
grunt.loadNpmTasks( "grunt-contrib-qunit" );
grunt.loadNpmTasks( "grunt-contrib-csslint" );
+grunt.loadNpmTasks( "grunt-jscs-checker" );
grunt.loadNpmTasks( "grunt-html" );
grunt.loadNpmTasks( "grunt-compare-size" );
grunt.loadNpmTasks( "grunt-git-authors" );
@@ -161,6 +162,13 @@ grunt.initConfig({
dest: "dist/jquery-ui.css"
}
},
+ jscs: {
+ // datepicker, sortable, resizable and draggable are getting rewritten, ignore until that's done
+ ui: [ "ui/jquery.ui.*.js", "!ui/jquery.ui.datepicker.js", "!ui/jquery.ui.sortable.js", "!ui/jquery.ui.resizable.js", "!ui/jquery.ui.draggable.js" ],
+ // TODO enable this once we have a tool that can help with fixing formatting of existing files
+ // tests: "tests/unit/**/*.js",
+ grunt: "Gruntfile.js"
+ },
uglify: minify,
htmllint: {
// ignore files that contain invalid html, used only for ajax content testing
@@ -197,7 +205,7 @@ grunt.initConfig({
});
grunt.registerTask( "default", [ "lint", "test" ] );
-grunt.registerTask( "lint", [ "asciilint", "jshint", "csslint", "htmllint" ] );
+grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ] );
grunt.registerTask( "test", [ "qunit" ] );
grunt.registerTask( "sizer", [ "concat:ui", "uglify:main", "compare_size:all" ] );
grunt.registerTask( "sizer_all", [ "concat:ui", "uglify", "compare_size" ] );