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
|
@ -46,7 +46,7 @@ describe('cmap', function() {
|
|||
|
||||
fetchBuiltInCMap = function (name) {
|
||||
return CMapReaderFactory.fetch({
|
||||
name: name,
|
||||
name,
|
||||
});
|
||||
};
|
||||
done();
|
||||
|
@ -175,7 +175,7 @@ describe('cmap', function() {
|
|||
var stream = new StringStream(str);
|
||||
var cmapPromise = CMapFactory.create({
|
||||
encoding: stream,
|
||||
fetchBuiltInCMap: fetchBuiltInCMap,
|
||||
fetchBuiltInCMap,
|
||||
useCMap: null,
|
||||
});
|
||||
cmapPromise.then(function (cmap) {
|
||||
|
@ -214,7 +214,7 @@ describe('cmap', function() {
|
|||
it('loads built in cmap', function(done) {
|
||||
var cmapPromise = CMapFactory.create({
|
||||
encoding: Name.get('Adobe-Japan1-1'),
|
||||
fetchBuiltInCMap: fetchBuiltInCMap,
|
||||
fetchBuiltInCMap,
|
||||
useCMap: null,
|
||||
});
|
||||
cmapPromise.then(function (cmap) {
|
||||
|
@ -231,7 +231,7 @@ describe('cmap', function() {
|
|||
it('loads built in identity cmap', function(done) {
|
||||
var cmapPromise = CMapFactory.create({
|
||||
encoding: Name.get('Identity-H'),
|
||||
fetchBuiltInCMap: fetchBuiltInCMap,
|
||||
fetchBuiltInCMap,
|
||||
useCMap: null,
|
||||
});
|
||||
cmapPromise.then(function (cmap) {
|
||||
|
@ -250,7 +250,7 @@ describe('cmap', function() {
|
|||
it('attempts to load a non-existent built-in CMap', function(done) {
|
||||
var cmapPromise = CMapFactory.create({
|
||||
encoding: Name.get('null'),
|
||||
fetchBuiltInCMap: fetchBuiltInCMap,
|
||||
fetchBuiltInCMap,
|
||||
useCMap: null,
|
||||
});
|
||||
cmapPromise.then(function () {
|
||||
|
@ -268,7 +268,7 @@ describe('cmap', function() {
|
|||
var CMapReaderFactory = isNodeJS() ?
|
||||
new NodeCMapReaderFactory({ }) : new DOMCMapReaderFactory({ });
|
||||
return CMapReaderFactory.fetch({
|
||||
name: name,
|
||||
name,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue