Skip to content

Commit

Permalink
Added jshintrc and some jshint wrapper rules to svg-injector.js
Browse files Browse the repository at this point in the history
  • Loading branch information
protodave committed Mar 31, 2014
1 parent 9aeec36 commit 13a2af6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"bitwise": true,
"camelcase": true,
"eqeqeq": true,
"forin": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"quotmark": "single",
"regexp": true,
"trailing": true,
"undef": true,
"unused": false,
"globalstrict": true,
"smarttabs": true,
"browser": true,
"node": true,
"jquery": false,
"strict": false,
"globals": {
"app": true,
"ignore": true
}
}
5 changes: 5 additions & 0 deletions svg-injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
var processRequestQueue = function (url) {
for (var i = 0, len = requestQueue[url].length; i < len; i++) {
// Make these calls async so we avoid blocking the page/renderer
/* jshint loopfunc: true */
(function (index) {
setTimeout(function () {
requestQueue[url][index](cloneSvg(svgCache[url]));
}, 0);
})(i);
/* jshint loopfunc: false */
}
};

Expand Down Expand Up @@ -296,7 +298,10 @@
throw new TypeError();
}

/* jshint bitwise: false */
var i, len = this.length >>> 0;
/* jshint bitwise: true */

for (i = 0; i < len; ++i) {
if (i in this) {
fn.call(scope, this[i], i, this);
Expand Down

0 comments on commit 13a2af6

Please sign in to comment.