From e293c0859230fcddf7f33f7bbe5316b846a8b1cb Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Fri, 30 Aug 2024 06:29:32 +0200 Subject: [PATCH] Convert even more strings to template strings --- src/index.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/index.js b/src/index.js index 283632b..b834036 100644 --- a/src/index.js +++ b/src/index.js @@ -134,16 +134,14 @@ for ( args[i] == "/h" || args[i] == "/?" ) { - console.log(name + " usage:"); + console.log(`${name} usage:`); console.log( "node svr.js [-h] [--help] [-?] [/h] [/?] [--secure] [--reset] [--clean] [--disable-mods] [--single-threaded] [-v] [--version]", ); console.log("-h -? /h /? --help -- Displays help"); console.log("--clean -- Cleans up files created by " + name); console.log( - "--reset -- Resets " + - name + - " to default settings (WARNING: DANGEROUS)", + `--reset -- Resets ${name} to default settings (WARNING: DANGEROUS)`, ); console.log("--secure -- Runs HTTPS server"); console.log("--disable-mods -- Disables mods (safe mode)"); @@ -180,17 +178,15 @@ for ( } else if (args[i] == "--single-threaded") { process.singleThreaded = true; } else { - console.log("Unrecognized argument: " + args[i]); - console.log(name + " usage:"); + console.log(`Unrecognized argument: ${args[i]}`); + console.log(`${name} usage:`); console.log( "node svr.js [-h] [--help] [-?] [/h] [/?] [--secure] [--reset] [--clean] [--disable-mods] [--single-threaded] [-v] [--version]", ); console.log("-h -? /h /? --help -- Displays help"); console.log("--clean -- Cleans up files created by " + name); console.log( - "--reset -- Resets " + - name + - " to default settings (WARNING: DANGEROUS)", + `--reset -- Resets ${name} to default settings (WARNING: DANGEROUS)`, ); console.log("--secure -- Runs HTTPS server"); console.log("--disable-mods -- Disables mods (safe mode)"); @@ -2150,9 +2146,7 @@ function start(init) { commands[command](argss, serverconsole.climessage); // eslint-disable-next-line no-unused-vars } catch (err) { - serverconsole.climessage( - 'Unrecognized command "' + command + '".', - ); + serverconsole.climessage(`Unrecognized command "${command}".`); } } }