From 5366b0d0ccd4ba620da1e4375b1e30058660d760 Mon Sep 17 00:00:00 2001 From: Oliver Mitchell Date: Wed, 6 May 2026 00:51:43 +0930 Subject: [PATCH] Fix PadLines: applied linting --- src/core/operations/PadLines.mjs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/operations/PadLines.mjs b/src/core/operations/PadLines.mjs index 8e22ad97..179607f8 100644 --- a/src/core/operations/PadLines.mjs +++ b/src/core/operations/PadLines.mjs @@ -19,7 +19,7 @@ class PadLines extends Operation { this.name = "Pad lines"; this.module = "Default"; - this.description = "Add the specified character to the start or end of each line. Padding can use either a fixed character count or a target final line length." + this.description = "Add the specified character to the start or end of each line. Padding can use either a fixed character count or a target final line length."; this.inputType = "string"; this.outputType = "string"; this.args = [ @@ -54,12 +54,10 @@ class PadLines extends Operation { run(input, args) { const [position, len, chr, mode] = args, lines = input.split("\n"); - let output = "", - i = 0; for (let i = 0; i < lines.length; i++) { - let line = lines[i]; - let targetLength = mode == "Fixed Count" ? line.length + len : len; + const line = lines[i]; + const targetLength = mode === "Fixed Count" ? line.length + len : len; if (position === "Start") { lines[i] = line.padStart(targetLength, chr); @@ -68,7 +66,7 @@ class PadLines extends Operation { } } - return lines.join('\n'); + return lines.join("\n"); } }