From 686d42402825c5091bad2daa507c06de63f6c5f3 Mon Sep 17 00:00:00 2001 From: Char1zardd Date: Sun, 6 Mar 2022 18:15:37 -0500 Subject: [PATCH] linting --- Launch-Scripts/createShortcut.js | 21 ++++++++++++++------- Launch-Scripts/runUninstall.js | 4 ++-- Launch-Scripts/systemCheck.js | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Launch-Scripts/createShortcut.js b/Launch-Scripts/createShortcut.js index ea87238d8b..b62abb3397 100644 --- a/Launch-Scripts/createShortcut.js +++ b/Launch-Scripts/createShortcut.js @@ -15,8 +15,15 @@ const createShortcut = () => { let target = path.join( __dirname, "launch-windows.bat") let icon = path.join( __dirname, "superalgos.ico") let shortcutPaths = [ - path.join( os.homedir(), "Desktop", `${name}.lnk`), - path.join( os.homedir(), "AppData", "Roaming", "Microsoft", "Windows", "Start Menu", "Programs", `${name}.lnk`) + path.join(os.homedir(), "Desktop", `${name}.lnk`), + path.join(os.homedir(), + "AppData", + "Roaming", + "Microsoft", + "Windows", + "Start Menu", + "Programs", + `${name}.lnk`) ] // Place Shortcuts using powershell @@ -28,12 +35,12 @@ const createShortcut = () => { shell: "powershell.exe", execArgv: "-ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command" }, - function ( error, stdout){ + (error, stdout) => { if (error) { console.log('') console.log("There was an error installing a shortcut: ") console.log('') - console.log( error ) + console.log(error) return false } else { console.log('') @@ -74,8 +81,8 @@ const createShortcut = () => { // Place shortcut in proper folders let command = `cp ${name}.desktop ~/Desktop/${name}.desktop & cp ${name}.desktop ~/.local/share/applications/${name}.desktop` - execSync( command, - function ( error, stdout ){ + execSync(command, + (error) => { if (error) { console.log('') console.log("There was an error installing a shortcut: ") @@ -100,7 +107,7 @@ const createShortcut = () => { // Mac Shortcuts } else if (os.platform() == "darwin") { - const icon = path.join( __dirname,"/superalgos.ico") + path.join( __dirname,"/superalgos.ico") const createShortcutCommand = `chmod +x ${name}.command & cp ${name}.command ~/Desktop/${name}.command` const installFileIconcommand = `npm install -g fileicon` const changeIconCommand = `./node_modules/fileicon/bin/fileicon set ~/Desktop/${name}.command ./Launch-Scripts/superalgos.ico` diff --git a/Launch-Scripts/runUninstall.js b/Launch-Scripts/runUninstall.js index a1f1c48aaa..ab77e10ff1 100644 --- a/Launch-Scripts/runUninstall.js +++ b/Launch-Scripts/runUninstall.js @@ -38,7 +38,7 @@ const uninstall = () => { // Remove .desktop files let command = `rm ~/Desktop/${name}.desktop & rm ~/.local/share/applications/${name}.desktop` - exec(command, (error, stdout) => { + exec(command, (error) => { if (error) { console.log('') console.log("There was an error uninstalling shortcuts: ") @@ -60,7 +60,7 @@ const uninstall = () => { if (os.platform() == "darwin") { // Remove .desktop files let command = `rm ~/Desktop/${name}.command` - exec(command, (error, stdout) => { + exec(command, (error) => { if (error) { console.log('') console.log("There was an error uninstalling shortcuts: ") diff --git a/Launch-Scripts/systemCheck.js b/Launch-Scripts/systemCheck.js index f4777602a8..fc91356e40 100644 --- a/Launch-Scripts/systemCheck.js +++ b/Launch-Scripts/systemCheck.js @@ -67,6 +67,6 @@ function systemCheck () { } return true -}; +} module.exports = systemCheck