mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
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
8 changed files with 13 additions and 48 deletions
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…
Add table
Add a link
Reference in a new issue