1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Adjust the brace-style ESLint rule to disallow single lines (and also enable no-iterator)

See http://eslint.org/docs/rules/brace-style.
Having the opening/closing braces on the same line can often make the code slightly more difficult to read, in particular for `if`/`else if` statements, compared to using new lines.

This patch also, for consistency with `mozilla-central`, enables the [`no-iterator`](http://eslint.org/docs/rules/no-iterator) rule. Note that this rule didn't require a single code change.
This commit is contained in:
Jonas Jenwald 2017-02-03 12:58:08 +01:00
parent 92e5fb099e
commit bc736fdc7d
18 changed files with 129 additions and 46 deletions

View file

@ -83,7 +83,9 @@ function initializePDFJS(callback) {
// Runner Parameters
var queryString = new jasmine.QueryString({
getWindowLocation: function() { return window.location; }
getWindowLocation: function() {
return window.location;
}
});
var catchingExceptions = queryString.getParam('catch');
@ -117,7 +119,9 @@ function initializePDFJS(callback) {
addToExistingQueryString: function(key, value) {
return queryString.fullStringWithNewParam(key, value);
},
getContainer: function() { return document.body; },
getContainer: function() {
return document.body;
},
createElement: function() {
return document.createElement.apply(document, arguments);
},
@ -138,7 +142,9 @@ function initializePDFJS(callback) {
// Filter which specs will be run by matching the start of the full name
// against the `spec` query param.
var specFilter = new jasmine.HtmlSpecFilter({
filterString: function() { return queryString.getParam('spec'); }
filterString: function() {
return queryString.getParam('spec');
}
});
env.specFilter = function(spec) {