Update the eslint-plugin-mozilla
to the latest version (PR 10905 follow-up)
This required adding a number of additional dependencies, based on https://dxr.mozilla.org/mozilla-central/rev/4aed8e10318f38571712350856bf9e61c5f84e1f/tools/lint/eslint/eslint-plugin-mozilla/package.json#32-37 Since this, implicitly, enabled "prettier"[1] for the `extensions/firefox` directory a couple of small code changes were necessary as well. --- [1] Generally speaking I'm wondering if that name is deliberately ironic, since the style it enforces is often times extremely weird and ugly :-P
This commit is contained in:
parent
37d5b80ba8
commit
d63da81e7c
@ -17,5 +17,6 @@
|
|||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["PdfJsDefaultPreferences"];
|
var EXPORTED_SYMBOLS = ["PdfJsDefaultPreferences"];
|
||||||
|
|
||||||
var PdfJsDefaultPreferences =
|
var PdfJsDefaultPreferences = Object.freeze(
|
||||||
Object.freeze(PDFJSDev.json("$ROOT/build/default_preferences.json"));
|
PDFJSDev.json("$ROOT/build/default_preferences.json")
|
||||||
|
);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
return text.replace(/\{\{\s*(\w+)\s*\}\}/g, function(all, name) {
|
return text.replace(/\{\{\s*(\w+)\s*\}\}/g, function(all, name) {
|
||||||
return (name in args ? args[name] : "{{" + name + "}}");
|
return name in args ? args[name] : "{{" + name + "}}";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@
|
|||||||
// use the short language code for "full" codes like 'ar-sa' (issue 5440)
|
// use the short language code for "full" codes like 'ar-sa' (issue 5440)
|
||||||
var shortCode = gLanguage.split("-")[0];
|
var shortCode = gLanguage.split("-")[0];
|
||||||
|
|
||||||
return (rtlList.includes(shortCode) ? "rtl" : "ltr");
|
return rtlList.includes(shortCode) ? "rtl" : "ltr";
|
||||||
},
|
},
|
||||||
|
|
||||||
getReadyState() {
|
getReadyState() {
|
||||||
@ -126,6 +126,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// translate an element or document fragment
|
// translate an element or document fragment
|
||||||
translate: translateFragment,
|
translate: translateFragment
|
||||||
};
|
};
|
||||||
})(this);
|
})(this);
|
||||||
|
96
package-lock.json
generated
96
package-lock.json
generated
@ -2896,13 +2896,27 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"dom-serializer": {
|
"dom-serializer": {
|
||||||
"version": "0.1.1",
|
"version": "0.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz",
|
||||||
"integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==",
|
"integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"domelementtype": "^1.3.0",
|
"domelementtype": "^2.0.1",
|
||||||
"entities": "^1.1.1"
|
"entities": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"domelementtype": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"entities": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"domain-browser": {
|
"domain-browser": {
|
||||||
@ -3403,6 +3417,15 @@
|
|||||||
"lodash.zip": "^4.2.0"
|
"lodash.zip": "^4.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eslint-config-prettier": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-VLsgK/D+S/FEsda7Um1+N8FThec6LqE3vhcMyp8mlmto97y3fGf3DX7byJexGuOb1QY0Z/zz222U5t+xSfcZDQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"get-stdin": "^6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-import-resolver-node": {
|
"eslint-import-resolver-node": {
|
||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
|
||||||
@ -3434,6 +3457,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eslint-plugin-fetch-options": {
|
||||||
|
"version": "0.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-fetch-options/-/eslint-plugin-fetch-options-0.0.5.tgz",
|
||||||
|
"integrity": "sha512-ZMxrccsOAZ7uMQ4nMvPJLqLg6oyLF96YOEwTKWAIbDHpwWUp1raXALZom8ikKucaEnhqWSRuBWI8jBXveFwkJg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"eslint-plugin-html": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-PQcGippOHS+HTbQCStmH5MY1BF2MaU8qW/+Mvo/8xTa/ioeMXdSP+IiaBw2+nh0KEMfYQKuTz1Zo+vHynjwhbg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"htmlparser2": "^3.10.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-plugin-import": {
|
"eslint-plugin-import": {
|
||||||
"version": "2.18.2",
|
"version": "2.18.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz",
|
||||||
@ -3481,9 +3519,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-mozilla": {
|
"eslint-plugin-mozilla": {
|
||||||
"version": "1.2.1",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-mozilla/-/eslint-plugin-mozilla-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-mozilla/-/eslint-plugin-mozilla-2.1.0.tgz",
|
||||||
"integrity": "sha512-i6SAWTPgKI6T50L6Gy41efR3StjPGR3IWkFOW/4aGsJtpl+OmJVaOmUfhp5PGis3ZbDisNvQ/vzLiNicAWC7nw==",
|
"integrity": "sha512-Fsu2kq3FZKgreXTew0UjArmnbGWnEnkgn21sojpuJ0GwUwI6T0Ee9MrMIeXiC0LhX6AkBtK+QkqQViw4sEgBZw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"htmlparser2": "3.10.1",
|
"htmlparser2": "3.10.1",
|
||||||
@ -3497,6 +3535,15 @@
|
|||||||
"integrity": "sha512-JnwpoH8Sv4QOjrTDutENBHzSnyYtspdjtglYtqUtAHe6f6LLKqykJle+UwFPg23GGwt5hI3amS9CRDezW8GAww==",
|
"integrity": "sha512-JnwpoH8Sv4QOjrTDutENBHzSnyYtspdjtglYtqUtAHe6f6LLKqykJle+UwFPg23GGwt5hI3amS9CRDezW8GAww==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"eslint-plugin-prettier": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"prettier-linter-helpers": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-plugin-unicorn": {
|
"eslint-plugin-unicorn": {
|
||||||
"version": "10.0.0",
|
"version": "10.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-10.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-10.0.0.tgz",
|
||||||
@ -3820,6 +3867,12 @@
|
|||||||
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
|
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"fast-diff": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"fast-json-stable-stringify": {
|
"fast-json-stable-stringify": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
||||||
@ -4692,6 +4745,12 @@
|
|||||||
"integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=",
|
"integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"get-stdin": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"get-stream": {
|
"get-stream": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||||
@ -5277,9 +5336,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
"version": "3.3.0",
|
"version": "3.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
|
||||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
@ -10687,6 +10746,21 @@
|
|||||||
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
|
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"prettier": {
|
||||||
|
"version": "1.18.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz",
|
||||||
|
"integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"prettier-linter-helpers": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fast-diff": "^1.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"pretty-hrtime": {
|
"pretty-hrtime": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
|
||||||
|
@ -14,9 +14,13 @@
|
|||||||
"core-js": "^2.6.9",
|
"core-js": "^2.6.9",
|
||||||
"escodegen": "^1.12.0",
|
"escodegen": "^1.12.0",
|
||||||
"eslint": "^6.2.2",
|
"eslint": "^6.2.2",
|
||||||
|
"eslint-config-prettier": "^6.2.0",
|
||||||
|
"eslint-plugin-fetch-options": "^0.0.5",
|
||||||
|
"eslint-plugin-html": "^6.0.0",
|
||||||
"eslint-plugin-import": "^2.18.2",
|
"eslint-plugin-import": "^2.18.2",
|
||||||
"eslint-plugin-mozilla": "1.2.1",
|
"eslint-plugin-mozilla": "^2.1.0",
|
||||||
"eslint-plugin-no-unsanitized": "^3.0.2",
|
"eslint-plugin-no-unsanitized": "^3.0.2",
|
||||||
|
"eslint-plugin-prettier": "^3.1.0",
|
||||||
"eslint-plugin-unicorn": "^10.0.0",
|
"eslint-plugin-unicorn": "^10.0.0",
|
||||||
"fancy-log": "^1.3.3",
|
"fancy-log": "^1.3.3",
|
||||||
"globals": "^11.12.0",
|
"globals": "^11.12.0",
|
||||||
@ -33,6 +37,7 @@
|
|||||||
"merge-stream": "^1.0.1",
|
"merge-stream": "^1.0.1",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"node-ensure": "^0.0.0",
|
"node-ensure": "^0.0.0",
|
||||||
|
"prettier": "^1.18.2",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^2.7.1",
|
||||||
"streamqueue": "^1.1.2",
|
"streamqueue": "^1.1.2",
|
||||||
"systemjs": "^0.21.6",
|
"systemjs": "^0.21.6",
|
||||||
|
Loading…
Reference in New Issue
Block a user