Merge pull request #5352 from overleaf/jpa-no-var

[misc] fix eslint violations for `no-var`

GitOrigin-RevId: c52e82f3a8a993b8662cc5aa56e7b95ca3c55832
This commit is contained in:
Jakob Ackermann
2021-10-27 08:03:00 +00:00
committed by Copybot
parent b6bbbda852
commit a7fe64e86c
115 changed files with 299 additions and 314 deletions
-1
View File
@@ -24,7 +24,6 @@
// START of temporary overrides
"array-callback-return": "off",
"no-dupe-else-if": "off",
"no-var": "off",
"no-empty": "off",
"node/handle-callback-err": "off",
"no-loss-of-precision": "off",
+2 -2
View File
@@ -112,7 +112,7 @@ class ASpellRunner {
const lines = output.split('\n')
const suggestions = {}
for (const line of Array.from(lines)) {
var parts, word
let parts, word
if (line[0] === '&') {
// Suggestions found
parts = line.split(' ')
@@ -187,5 +187,5 @@ ASpell.promises = promises
module.exports = ASpell
var WorkerPool = new ASpellWorkerPool()
const WorkerPool = new ASpellWorkerPool()
module.exports.cacheDump = cacheDump
+2 -2
View File
@@ -112,7 +112,7 @@ class ASpellWorker {
})
this.pipe.stdout.setEncoding('utf8') // ensure utf8 output is handled correctly
var output = ''
let output = ''
const endMarkerRegex = new RegExp('^[a-z][a-z]', 'gm')
this.pipe.stdout.on('data', data => {
// We receive the language code from Aspell as the end of data marker in
@@ -143,7 +143,7 @@ class ASpellWorker {
}
})
var error = ''
let error = ''
this.pipe.stderr.on('data', chunk => {
return (error = error + chunk)
})