Enable the ESLint no-var
rule in the external/
folder
These changes were done automatically, by using the `gulp lint --fix` command.
This commit is contained in:
parent
67b866b9ed
commit
96d2a2f795
@ -10,7 +10,6 @@ external/quickjs/
|
||||
src/shared/cffStandardStrings.js
|
||||
src/shared/fonts_utils.js
|
||||
test/tmp/
|
||||
test/features/
|
||||
test/pdfs/
|
||||
test/resources/
|
||||
*~/
|
||||
|
5
external/.eslintrc
vendored
5
external/.eslintrc
vendored
@ -6,9 +6,4 @@
|
||||
"env": {
|
||||
"node": true,
|
||||
},
|
||||
|
||||
"rules": {
|
||||
// ECMAScript 6
|
||||
"no-var": "off",
|
||||
},
|
||||
}
|
||||
|
10
external/builder/.eslintrc
vendored
10
external/builder/.eslintrc
vendored
@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"../.eslintrc"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
// ECMAScript 6
|
||||
"no-var": "error",
|
||||
},
|
||||
}
|
10
external/cmapscompress/.eslintrc
vendored
10
external/cmapscompress/.eslintrc
vendored
@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"../.eslintrc"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
// ECMAScript 6
|
||||
"no-var": "error",
|
||||
},
|
||||
}
|
4
external/dist/webpack.js
vendored
4
external/dist/webpack.js
vendored
@ -15,8 +15,8 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
var pdfjs = require("./build/pdf.js");
|
||||
var PdfjsWorker = require("worker-loader?esModule=false&filename=[name].js!./build/pdf.worker.js");
|
||||
const pdfjs = require("./build/pdf.js");
|
||||
const PdfjsWorker = require("worker-loader?esModule=false&filename=[name].js!./build/pdf.worker.js");
|
||||
|
||||
if (typeof window !== "undefined" && "Worker" in window) {
|
||||
pdfjs.GlobalWorkerOptions.workerPort = new PdfjsWorker();
|
||||
|
10
external/importL10n/.eslintrc
vendored
10
external/importL10n/.eslintrc
vendored
@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"../.eslintrc"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
// ECMAScript 6
|
||||
"no-var": "error",
|
||||
},
|
||||
}
|
2
external/systemjs/plugin-babel-cached.js
vendored
2
external/systemjs/plugin-babel-cached.js
vendored
@ -12,6 +12,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint-disable no-var */
|
||||
|
||||
var babel = require("plugin-babel");
|
||||
|
||||
var cacheExpiration = 60 /* min */ * 60 * 1000;
|
||||
|
19
external/webpack/pdfjsdev-loader.js
vendored
19
external/webpack/pdfjsdev-loader.js
vendored
@ -12,12 +12,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint-env node */
|
||||
|
||||
"use strict";
|
||||
|
||||
var preprocessor2 = require("../builder/preprocessor2.js");
|
||||
var path = require("path");
|
||||
const preprocessor2 = require("../builder/preprocessor2.js");
|
||||
const path = require("path");
|
||||
|
||||
module.exports = function (source) {
|
||||
// Options must be specified, ignoring request if not.
|
||||
@ -26,17 +25,17 @@ module.exports = function (source) {
|
||||
}
|
||||
this.cacheable();
|
||||
|
||||
var filePath = this.resourcePath;
|
||||
var context = this.rootContext;
|
||||
var sourcePath = path.relative(context, filePath).split(path.sep).join("/");
|
||||
const filePath = this.resourcePath;
|
||||
const context = this.rootContext;
|
||||
const sourcePath = path.relative(context, filePath).split(path.sep).join("/");
|
||||
|
||||
var ctx = Object.create(this.query);
|
||||
const ctx = Object.create(this.query);
|
||||
ctx.sourceMap = true;
|
||||
ctx.sourceFile = sourcePath;
|
||||
|
||||
var callback = this.callback;
|
||||
var sourceAndMap = preprocessor2.preprocessPDFJSCode(ctx, source);
|
||||
var map = sourceAndMap.map.toJSON();
|
||||
const callback = this.callback;
|
||||
const sourceAndMap = preprocessor2.preprocessPDFJSCode(ctx, source);
|
||||
const map = sourceAndMap.map.toJSON();
|
||||
// escodegen does not embed source -- setting map's sourcesContent.
|
||||
map.sourcesContent = [source];
|
||||
callback(null, sourceAndMap.code, map);
|
||||
|
Loading…
Reference in New Issue
Block a user