aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-04-02 19:12:10 -0400
committerScott González <scott.gonzalez@gmail.com>2012-04-02 19:12:10 -0400
commit3e6877a892b8fb70f1130f639dfde09ce5af6236 (patch)
treea728ec3de12ae6998ff8246b0523ef4c479e5f17
parentccbfd45924d6ddebc7b2bb575a9c8997a3d9ec03 (diff)
downloadjquery-ui-3e6877a892b8fb70f1130f639dfde09ce5af6236.tar.gz
jquery-ui-3e6877a892b8fb70f1130f639dfde09ce5af6236.zip
Grunt: Fixed jshint options.
-rw-r--r--grunt.js93
1 files changed, 56 insertions, 37 deletions
diff --git a/grunt.js b/grunt.js
index ad4c8bd40..1e8a197dc 100644
--- a/grunt.js
+++ b/grunt.js
@@ -278,52 +278,71 @@ grunt.initConfig({
}
}
},
- jshint: {
- options: {
+ jshint: (function() {
+ var defaults = {
curly: true,
+ eqnull: true,
eqeqeq: true,
- immed: true,
+ expr: true,
latedef: true,
newcap: true,
noarg: true,
- sub: true,
- undef: true,
- eqnull: true
- },
- grunt: {
- options: {
- node: true
- },
- globals: {
- task: true,
- config: true,
- file: true,
- log: true,
- template: true
+ onevar: true,
+ // TODO: limit to multi-line comments https://github.com/jshint/jshint/issues/503
+ smarttabs: true,
+ // TODO: use "faux strict mode" https://github.com/jshint/jshint/issues/504
+ // strict: true,
+ // TODO: enable trailing
+ // trailing: true,
+ undef: true
+ };
+
+ function extend( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
}
- },
- ui: {
- options: {
- browser: true
+ return a;
+ }
+
+ return {
+ options: defaults,
+ grunt: {
+ options: extend({
+ node: true
+ }, defaults ),
+ globals: {
+ task: true,
+ config: true,
+ file: true,
+ log: true,
+ template: true
+ }
},
- globals: {
- jQuery: true
- }
- },
- tests: {
- options: {
- jquery: true
+ ui: {
+ options: extend({
+ browser: true,
+ jquery: true
+ }, defaults ),
+ globals: {
+ Globalize: true
+ }
},
- globals: {
- module: true,
- test: true,
- ok: true,
- equal: true,
- deepEqual: true,
- QUnit: true
+ tests: {
+ options: extend({
+ browser: true,
+ jquery: true
+ }, defaults ),
+ globals: {
+ module: true,
+ test: true,
+ ok: true,
+ equal: true,
+ deepEqual: true,
+ QUnit: true
+ }
}
- }
- }
+ };
+ })()
});
grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @VERSION with pkg.version", function() {