From fcaef889682d6724f7b8e662c66a7539a95ae3d8 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Tue, 16 Oct 2012 11:26:14 -0400 Subject: [PATCH] Clean up jshintrc configs. Close gh-983. --- .jshintrc | 24 ++++++++++++++---------- grunt.js | 13 ++----------- src/.jshintrc | 14 +++++++------- test/.jshintrc | 16 ++++++++-------- 4 files changed, 31 insertions(+), 36 deletions(-) diff --git a/.jshintrc b/.jshintrc index 1c2f7c2b0..5ff1e697d 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,12 +1,16 @@ { - "curly": true, - "eqnull": true, - "eqeqeq": true, - "expr": true, - "latedef": true, - "noarg": true, - "quotmark": "double", - "smarttabs": true, - "trailing": true, - "undef": true + "options": { + "curly": true, + "eqeqeq": true, + "eqnull": true, + "expr": true, + "latedef": true, + "noarg": true, + "node": true, + "quotmark": "double", + "smarttabs": true, + "trailing": true, + "undef": true, + "unused": true + } } diff --git a/grunt.js b/grunt.js index 9138925d7..ff44d9f70 100644 --- a/grunt.js +++ b/grunt.js @@ -5,9 +5,6 @@ * */ -/*jshint node: true */ -/*global config:true, task:true, process:true*/ - module.exports = function( grunt ) { "use strict"; @@ -24,15 +21,10 @@ module.exports = function( grunt ) { return data; } - var task = grunt.task; var file = grunt.file; - var utils = grunt.utils; var log = grunt.log; var verbose = grunt.verbose; - var fail = grunt.fail; - var option = grunt.option; var config = grunt.config; - var template = grunt.template; var distpaths = [ "dist/jquery.js", "dist/jquery.min.js" @@ -99,7 +91,7 @@ module.exports = function( grunt ) { } return { - options: jshintrc(), + grunt: jshintrc(), dist: jshintrc( "src/" ), tests: jshintrc( "test/" ) }; @@ -260,8 +252,7 @@ module.exports = function( grunt ) { "Concatenate source (include/exclude modules with +/- flags), embed date/version", function() { // Concat specified files. - var i, - compiled = "", + var compiled = "", modules = this.flags, explicit = Object.keys(modules).length > 1, optIn = !modules["*"], diff --git a/src/.jshintrc b/src/.jshintrc index d75461017..2ce0eca6f 100644 --- a/src/.jshintrc +++ b/src/.jshintrc @@ -1,17 +1,17 @@ { "options": { - "evil": true, "browser": true, - "wsh": true, + "curly": true, "eqnull": true, + "evil": true, "expr": true, - "curly": true, - "trailing": true, - "undef": true, + "maxerr": 100, + "quotmark": "double", "smarttabs": true, "sub": true, - "maxerr": 100, - "quotmark": "double" + "trailing": true, + "undef": true, + "wsh": true }, "globals": { "define": true, diff --git a/test/.jshintrc b/test/.jshintrc index 9068558c4..11e1c0361 100644 --- a/test/.jshintrc +++ b/test/.jshintrc @@ -1,17 +1,18 @@ { "options": { - "evil": true, "browser": true, - "wsh": true, + "curly": true, + "devel": true, "eqnull": true, + "evil": true, "expr": true, - "curly": true, - "trailing": true, - "undef": true, - "smarttabs": true, "maxerr": 100, + "quotmark": "double", + "smarttabs": true, "sub": true, - "quotmark": "double" + "trailing": true, + "undef": true, + "wsh": true }, "globals": { "define": true, @@ -24,7 +25,6 @@ "require": true, "file": true, "log": true, - "console": true, "QUnit": true, "ok": true, "equal": true, -- 2.39.5