Skip to content

Commit c33108c

Browse files
mgoltimmywil
authored andcommitted
Update devDependencies, adjust .jshintrc to jsHint 2.x, use .jshintignore. Close jquerygh-1283.
1 parent bc4e976 commit c33108c

File tree

6 files changed

+39
-39
lines changed

6 files changed

+39
-39
lines changed

.jshintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
test/qunit/**
2+
test/data/jquery-1.9.1.ajax_xhr.min.js
3+
test/data/badcall.js
4+
test/data/badjson.js
5+
test/data/json_obj.js
6+
test/data/readywaitasset.js
7+
test/data/readywaitloader.js

Gruntfile.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ module.exports = function( grunt ) {
1515
} catch(e) {}
1616
return data;
1717
},
18-
srcHintOptions = readOptionalJSON("src/.jshintrc");
18+
fs = require( "fs" ),
19+
srcHintOptions = readOptionalJSON( "src/.jshintrc" );
1920

2021
// The concatenated file won't pass onevar
2122
// But our modules can
@@ -85,9 +86,7 @@ module.exports = function( grunt ) {
8586
}
8687
},
8788
tests: {
88-
// TODO: Once .jshintignore is supported, use that instead.
89-
// issue located here: https://github.com/gruntjs/grunt-contrib-jshint/issues/1
90-
src: [ "test/data/{test,testinit,testrunner}.js", "test/unit/**/*.js" ],
89+
src: [ "test/**/*.js" ],
9190
options: {
9291
jshintrc: "test/.jshintrc"
9392
}
@@ -453,7 +452,7 @@ module.exports = function( grunt ) {
453452

454453
// Process files for distribution
455454
grunt.registerTask( "dist", function() {
456-
var stored, flags, paths, fs, nonascii;
455+
var stored, flags, paths, nonascii;
457456

458457
// Check for stored destination paths
459458
// ( set in dist/.destination.json )
@@ -468,7 +467,6 @@ module.exports = function( grunt ) {
468467
});
469468

470469
// Ensure the dist files are pure ASCII
471-
fs = require( "fs" );
472470
nonascii = false;
473471

474472
distpaths.forEach(function( filename ) {
@@ -559,8 +557,6 @@ module.exports = function( grunt ) {
559557
// The problem is caused by the pre-uglify task.
560558
// Also, remove temporary files.
561559
grunt.registerMultiTask( "post-uglify", function() {
562-
var fs = require( "fs" );
563-
564560
this.files.forEach(function( mapping ) {
565561
var mapFileName = mapping.src[ 0 ];
566562

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
],
2424
"dependencies": {},
2525
"devDependencies": {
26-
"grunt": "0.4.1",
26+
"grunt": "~0.4.1",
2727
"grunt-compare-size": "~0.4.0",
28-
"grunt-git-authors": "1.2.0",
28+
"grunt-git-authors": "~1.2.0",
2929
"grunt-contrib-watch": "~0.4.4",
3030
"grunt-contrib-jshint": "~0.6.0",
3131
"grunt-contrib-uglify": "~0.2.2",
32-
"gzip-js": "0.3.1",
32+
"gzip-js": "0.3.2",
3333
"testswarm": "~1.1.0",
34-
"archiver": "~0.4.2"
34+
"archiver": "~0.4.6"
3535
},
3636
"keywords": []
3737
}

src/.jshintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"sub": true,
1717

1818
"browser": true,
19-
"es5": true,
2019

2120
"globals": {
2221
"jQuery": true,

test/.jshintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/.jshintrc

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,33 @@
2121
"wsh": true,
2222

2323
"globals": {
24-
"DOMParser": true,
24+
"DOMParser": false,
25+
"QUnit": false,
26+
"ok": false,
27+
"equal": false,
28+
"asyncTest": false,
29+
"notEqual": false,
30+
"deepEqual": false,
31+
"strictEqual": false,
32+
"notStrictEqual": false,
33+
"start": false,
34+
"stop": false,
35+
"expect": false,
36+
"raises": false,
37+
"ajaxTest": false,
38+
"testIframe": false,
39+
"testIframeWithCallback": false,
40+
"createDashboardXML": false,
41+
"createXMLFragment": false,
42+
"moduleTeardown": false,
43+
"testFoo": false,
44+
"url": false,
45+
"t": false,
46+
"q": false,
47+
2548
"jQuery": true,
26-
"QUnit": true,
2749
"module": true,
28-
"ok": true,
29-
"equal": true,
3050
"test": true,
31-
"asyncTest": true,
32-
"notEqual": true,
33-
"deepEqual": true,
34-
"strictEqual": true,
35-
"notStrictEqual": true,
36-
"start": true,
37-
"stop": true,
38-
"expect": true,
39-
"raises": true,
40-
"ajaxTest": true,
41-
"testIframe": true,
42-
"testIframeWithCallback": true,
43-
"createDashboardXML": true,
44-
"createXMLFragment": true,
45-
"moduleTeardown": true,
46-
"testFoo": true,
47-
"url": true,
48-
"t": true,
49-
"q": true,
5051
"amdDefined": true,
5152
"fireNative": true,
5253
"Globals": true,

0 commit comments

Comments
 (0)