Skip to content

Commit

Permalink
Fixes due to breaking no-empty change eslint/eslint#2187
Browse files Browse the repository at this point in the history
  • Loading branch information
nicjansma committed Apr 2, 2015
1 parent 11c9116 commit 45a435c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"env": {
"browser": true
"browser":true
},
"globals": {
"BOOMR":true,
Expand All @@ -22,9 +22,10 @@
"no-console":0,
"no-delete-var":0,
"no-underscore-dangle":0,
"no-multi-spaces": 0,
"no-multi-spaces":0,
"dot-notation":[2, {"allowKeywords": false}],
"space-unary-ops": 0,
"key-spacing": 0
"space-unary-ops":0,
"key-spacing":0,
"no-empty":2
}
}
8 changes: 7 additions & 1 deletion boomerang.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ if (!BOOMR.plugins) { BOOMR.plugins = {}; }
}
}
catch(ignore) {
// empty
}

try {
Expand All @@ -138,6 +139,7 @@ if (!BOOMR.plugins) { BOOMR.plugins = {}; }
}
}
catch(ignore) {
// empty
}

if (!createCustomEvent && d.createEventObject) {
Expand Down Expand Up @@ -687,6 +689,7 @@ boomr = {
try {
form.submit();
} catch (ignore) {
// empty
}

if (urls.length) {
Expand Down Expand Up @@ -866,7 +869,10 @@ boomr = {
};
}
}
catch(ignore) { }
catch(ignore) {
// empty
}

return Date.now || function() { return new Date().getTime(); };
}()),

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-uglify": "^0.6.0",
"grunt-eslint": "*",
"grunt-eslint": "^10.0.0",
"grunt-filesize": "0.0.7",
"grunt-karma": "^0.9.0",
"grunt-protractor-runner": "^1.2.1",
Expand Down
6 changes: 3 additions & 3 deletions plugins/navtiming.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var impl = {

BOOMR.addVar(data);

try { impl.addedVars.push.apply(impl.addedVars, Object.keys(data)); } catch(ignore) {}
try { impl.addedVars.push.apply(impl.addedVars, Object.keys(data)); } catch(ignore) { /* empty */ }

this.complete = true;
BOOMR.sendBeacon();
Expand Down Expand Up @@ -142,7 +142,7 @@ var impl = {

BOOMR.addVar(data);

try { impl.addedVars.push.apply(impl.addedVars, Object.keys(data)); } catch(ignore) {}
try { impl.addedVars.push.apply(impl.addedVars, Object.keys(data)); } catch(ignore) { /* empty */ }
}

// XXX Inconsistency warning. msFirstPaint above is in milliseconds while
Expand All @@ -159,7 +159,7 @@ var impl = {

BOOMR.addVar(data);

try { impl.addedVars.push.apply(impl.addedVars, Object.keys(data)); } catch(ignore) {}
try { impl.addedVars.push.apply(impl.addedVars, Object.keys(data)); } catch(ignore) { /* empty */ }
}
}

Expand Down
3 changes: 1 addition & 2 deletions plugins/page-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,7 @@ Handler.prototype = {
return null;
}
}
catch(ignore) {
}
catch(ignore) { /* empty */ }

BOOMR.addError(e, "PageVars.findResource");
return null;
Expand Down
2 changes: 1 addition & 1 deletion plugins/restiming.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function getNavStartTime(frame) {
}
catch(e)
{
// swallow all access exceptions
// empty
}

return navStart;
Expand Down

0 comments on commit 45a435c

Please sign in to comment.