Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[web/debugger.js] Enable the ESLint `no-var rule
These changes were made *mostly* automatically, using `gulp lint --fix`, with the following manual changes: ```diff diff --git a/web/debugger.js b/web/debugger.js index 1cda4066e..6f8b4a9f0 100644 --- a/web/debugger.js +++ b/web/debugger.js @@ -264,10 +264,9 @@ const Stepper = (function StepperClosure() { } if ("length" in args) { // array - let simpleArgs = [], - i, - ii; - const MAX_ITEMS = 10; + const MAX_ITEMS = 10, + simpleArgs = []; + let i, ii; for (i = 0, ii = Math.min(MAX_ITEMS, args.length); i < ii; i++) { simpleArgs.push(simplifyArgs(args[i])); } @@ -511,11 +510,8 @@ window.PDFBug = (function PDFBugClosure() { return { tools: [FontInspector, StepperManager, Stats], enable(ids) { - let all = false, - tools = this.tools; - if (ids.length === 1 && ids[0] === "all") { - all = true; - } + const all = ids.length === 1 && ids[0] === "all"; + const tools = this.tools; for (let i = 0; i < tools.length; ++i) { const tool = tools[i]; if (all || ids.includes(tool.id)) { ```
- Loading branch information