mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +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:
parent
00d67371ec
commit
7560f12a17
21 changed files with 99 additions and 85 deletions
|
@ -24,7 +24,7 @@ describe('evaluator', function() {
|
|||
this.queue = queue || [];
|
||||
}
|
||||
XrefMock.prototype = {
|
||||
fetchIfRef: function() {
|
||||
fetchIfRef() {
|
||||
return this.queue.shift();
|
||||
}
|
||||
};
|
||||
|
@ -32,13 +32,13 @@ describe('evaluator', function() {
|
|||
this.inputs = [];
|
||||
}
|
||||
HandlerMock.prototype = {
|
||||
send: function(name, data) {
|
||||
this.inputs.push({name: name, data: data});
|
||||
send(name, data) {
|
||||
this.inputs.push({ name, data, });
|
||||
}
|
||||
};
|
||||
function ResourcesMock() { }
|
||||
ResourcesMock.prototype = {
|
||||
get: function(name) {
|
||||
get(name) {
|
||||
return this[name];
|
||||
}
|
||||
};
|
||||
|
@ -319,7 +319,7 @@ describe('evaluator', function() {
|
|||
describe('operator list', function () {
|
||||
function MessageHandlerMock() { }
|
||||
MessageHandlerMock.prototype = {
|
||||
send: function () { },
|
||||
send() { },
|
||||
};
|
||||
|
||||
it('should get correct total length after flushing', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue