From 7ec2bd0f01d7fa59ea1f23f2ae127b3436914549 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 14 Mar 2021 10:25:51 +0100 Subject: [PATCH] Enable the ESLint `no-var` rule in `test/add_test.js` These changes were done automatically, by using the `gulp lint --fix` command. --- test/add_test.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/add_test.js b/test/add_test.js index ca4b4b18b..bb063f1cb 100644 --- a/test/add_test.js +++ b/test/add_test.js @@ -1,5 +1,3 @@ -/* eslint-disable no-var */ - const fs = require("fs"); const crypto = require("crypto"); const execSync = require("child_process").execSync; @@ -25,8 +23,8 @@ if (!fs.existsSync(file)) { } function calculateMD5(pdfFile, callback) { - var hash = crypto.createHash("md5"); - var stream = fs.createReadStream(pdfFile); + const hash = crypto.createHash("md5"); + const stream = fs.createReadStream(pdfFile); stream.on("data", function (data) { hash.update(data); }); @@ -34,7 +32,7 @@ function calculateMD5(pdfFile, callback) { callback(err); }); stream.on("end", function () { - var result = hash.digest("hex"); + const result = hash.digest("hex"); callback(null, result); }); }