From f643968461f1b6f1f0c924d88229543c2e0d82f4 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Sat, 27 Apr 2024 16:17:55 +0200 Subject: [PATCH] fix lint --- lib/Api.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Api.js b/lib/Api.js index 20ecc66af..80432e0d5 100644 --- a/lib/Api.js +++ b/lib/Api.js @@ -279,9 +279,9 @@ class Api { return this.addPodSpecs(plugin, podSpecs, installOptions); } }) - .then(()=>{ + .then(() => { if (plugin != null && fs.existsSync(path.join(plugin.dir, 'Package.swift'))) { - return this.updatePackageSwift(plugin, "add"); + return this.updatePackageSwift(plugin, 'add'); } }) // CB-11022 Return truthy value to prevent running prepare after @@ -330,9 +330,9 @@ class Api { return this.removePodSpecs(plugin, podSpecs, uninstallOptions); } }) - .then(()=>{ + .then(() => { if (plugin != null && fs.existsSync(path.join(plugin.dir, 'Package.swift'))) { - return this.updatePackageSwift(plugin, "remove"); + return this.updatePackageSwift(plugin, 'remove'); } }) // CB-11022 Return truthy value to prevent running prepare after @@ -527,7 +527,7 @@ class Api { * @param {PluginInfo} plugin plugin to edit the Package.swift with * @param {String} mode Add or remove plugin */ - updatePackageSwift(plugin, mode) { + updatePackageSwift (plugin, mode) { const project_dir = this.locations.root; const pluginDep = ` package.dependencies.append(.package(name: "${plugin.id}", path: "../../../plugins/${plugin.id}")) @@ -535,7 +535,7 @@ package.targets.first?.dependencies.append(.product(name: "${plugin.id}", packag `; const packagePath = path.join(project_dir, 'CordovaPluginsSPM', 'Package.swift'); let packageContent = fs.readFileSync(packagePath, 'utf8'); - if (mode === "add") { + if (mode === 'add') { packageContent = packageContent + pluginDep; } else { packageContent = packageContent.replace(pluginDep, '');