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

Enable the object-shorthand ESLint rule

Please see http://eslint.org/docs/rules/object-shorthand.

Unfortunately, based on commit 9276d1dcd9, it seems that we still need to maintain compatibility with old Node.js versions, hence certain files/directories that are executed in Node.js are currently exempt from this rule.

Furthermore, since the files specific to the Chromium extension are not run through Babel, the `/extensions/chromium/` directory is also exempt from this rule.
This commit is contained in:
Jonas Jenwald 2017-04-28 13:40:47 +02:00
parent 00d67371ec
commit 7560f12a17
21 changed files with 99 additions and 85 deletions

View file

@ -79,7 +79,7 @@ function initializePDFJS(callback) {
// Runner Parameters
var queryString = new jasmine.QueryString({
getWindowLocation: function() {
getWindowLocation() {
return window.location;
}
});
@ -101,27 +101,27 @@ function initializePDFJS(callback) {
// Reporters
var htmlReporter = new jasmine.HtmlReporter({
env: env,
onRaiseExceptionsClick: function() {
env,
onRaiseExceptionsClick() {
queryString.navigateWithNewParam('catch', !env.catchingExceptions());
},
onThrowExpectationsClick: function() {
onThrowExpectationsClick() {
queryString.navigateWithNewParam('throwFailures',
!env.throwingExpectationFailures());
},
onRandomClick: function() {
onRandomClick() {
queryString.navigateWithNewParam('random', !env.randomTests());
},
addToExistingQueryString: function(key, value) {
addToExistingQueryString(key, value) {
return queryString.fullStringWithNewParam(key, value);
},
getContainer: function() {
getContainer() {
return document.body;
},
createElement: function() {
createElement() {
return document.createElement.apply(document, arguments);
},
createTextNode: function() {
createTextNode() {
return document.createTextNode.apply(document, arguments);
},
timer: new jasmine.Timer()
@ -138,7 +138,7 @@ 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() {
filterString() {
return queryString.getParam('spec');
}
});