diff --git a/.eslintignore b/.eslintignore index e72c6d82f7049..7a05f72ce35a6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,7 +10,6 @@ external/quickjs/ src/shared/cffStandardStrings.js src/shared/fonts_utils.js test/tmp/ -test/features/ test/pdfs/ test/resources/ *~/ diff --git a/external/.eslintrc b/external/.eslintrc index 64c94ad96cf36..e3523dce526ed 100644 --- a/external/.eslintrc +++ b/external/.eslintrc @@ -6,9 +6,4 @@ "env": { "node": true, }, - - "rules": { - // ECMAScript 6 - "no-var": "off", - }, } diff --git a/external/builder/.eslintrc b/external/builder/.eslintrc deleted file mode 100644 index 4a0b538f60890..0000000000000 --- a/external/builder/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "../.eslintrc" - ], - - "rules": { - // ECMAScript 6 - "no-var": "error", - }, -} diff --git a/external/cmapscompress/.eslintrc b/external/cmapscompress/.eslintrc deleted file mode 100644 index 4a0b538f60890..0000000000000 --- a/external/cmapscompress/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "../.eslintrc" - ], - - "rules": { - // ECMAScript 6 - "no-var": "error", - }, -} diff --git a/external/dist/webpack.js b/external/dist/webpack.js index 7c1ce09ba4d84..45598babcb9f5 100644 --- a/external/dist/webpack.js +++ b/external/dist/webpack.js @@ -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(); diff --git a/external/importL10n/.eslintrc b/external/importL10n/.eslintrc deleted file mode 100644 index 4a0b538f60890..0000000000000 --- a/external/importL10n/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "../.eslintrc" - ], - - "rules": { - // ECMAScript 6 - "no-var": "error", - }, -} diff --git a/external/systemjs/plugin-babel-cached.js b/external/systemjs/plugin-babel-cached.js index d0f2e711ce371..518dfa4ce696f 100644 --- a/external/systemjs/plugin-babel-cached.js +++ b/external/systemjs/plugin-babel-cached.js @@ -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; diff --git a/external/webpack/pdfjsdev-loader.js b/external/webpack/pdfjsdev-loader.js index 1bbcacf71237e..c290b639c4eb4 100644 --- a/external/webpack/pdfjsdev-loader.js +++ b/external/webpack/pdfjsdev-loader.js @@ -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);