diff --git a/.jshintrc b/.jshintrc index 7c4993e1..a358f722 100644 --- a/.jshintrc +++ b/.jshintrc @@ -12,5 +12,6 @@ "unused": "vars", "validthis": true, "browser": true, - "node": true + "node": true, + "laxbreak": true } diff --git a/src/core/core.js b/src/core/core.js index 2ea94e81..696fe756 100644 --- a/src/core/core.js +++ b/src/core/core.js @@ -2309,10 +2309,11 @@ function clone(obj) { // export Crafty if (typeof define === "function") { // AMD + // jshint ignore:start define("crafty", [], function() { - // jshint ignore:line return Crafty; }); + // jshint ignore:end } module.exports = Crafty; diff --git a/tests/unit/common.js b/tests/unit/common.js index 80f6ffed..20edb68e 100644 --- a/tests/unit/common.js +++ b/tests/unit/common.js @@ -27,8 +27,9 @@ Crafty.pause(); // Helper functions // ////////////////////// +// Disable jshint rules for setting global vars +// jshint -W020 resetStage = function() { - // jshint ignore:line Crafty.viewport.reset(); Crafty.viewport.scroll("_x", 0); Crafty.viewport.scroll("_y", 0); @@ -36,12 +37,10 @@ resetStage = function() { }; Round = function(x) { - // jshint ignore:line return Math.round(x * 100) / 100; }; keysUp = function() { - // jshint ignore:line var keysToRelease = Array.prototype.slice.call(arguments); for (var k in keysToRelease) { var key = Crafty.keys[keysToRelease[k]] || keysToRelease[k]; @@ -49,7 +48,6 @@ keysUp = function() { } }; keysDown = function() { - // jshint ignore:line var keysToPress = Array.prototype.slice.call(arguments); for (var k in keysToPress) { var key = Crafty.keys[keysToPress[k]] || keysToPress[k]; @@ -59,6 +57,7 @@ keysDown = function() { }); } }; +// jshint +W020 ////////////////// // QUnit config //