aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers
diff options
context:
space:
mode:
authorLibravatar MCMXC <16797721+mcmxcdev@users.noreply.github.com>2023-12-07 22:37:37 -0700
committerLibravatar GitHub <noreply@github.com>2023-12-07 22:37:37 -0700
commita774c879d4cf08a76fc404771883807d27465265 (patch)
tree202c9afdeb4830d417e0ec7137a01e7981c8651c /src/helpers
parent6.6.1-nightly.17 [skip ci] (diff)
downloadferdium-app-a774c879d4cf08a76fc404771883807d27465265.tar.gz
ferdium-app-a774c879d4cf08a76fc404771883807d27465265.tar.zst
ferdium-app-a774c879d4cf08a76fc404771883807d27465265.zip
refactor: code cleanup (#1476)
- auto update `settings.json` due to new vscode version - replace deprecated `e.keyCode` with `e.key` - fix various code snippets with sonarlint and other lint plugins
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/service-helpers.ts2
-rw-r--r--src/helpers/update-helpers.ts2
-rw-r--r--src/helpers/userAgent-helpers.ts2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/helpers/service-helpers.ts b/src/helpers/service-helpers.ts
index 678d5024f..f27d53285 100644
--- a/src/helpers/service-helpers.ts
+++ b/src/helpers/service-helpers.ts
@@ -12,7 +12,7 @@ export function removeServicePartitionDirectory(
12 const servicePartition = getServicePartitionsDirectory( 12 const servicePartition = getServicePartitionsDirectory(
13 `${addServicePrefix ? 'service-' : ''}${id}`, 13 `${addServicePrefix ? 'service-' : ''}${id}`,
14 ); 14 );
15 return removeSync(servicePartition); 15 removeSync(servicePartition);
16} 16}
17 17
18export async function getServiceIdsFromPartitions() { 18export async function getServiceIdsFromPartitions() {
diff --git a/src/helpers/update-helpers.ts b/src/helpers/update-helpers.ts
index 9a36850fc..ca541c4b0 100644
--- a/src/helpers/update-helpers.ts
+++ b/src/helpers/update-helpers.ts
@@ -5,7 +5,7 @@ export function getFerdiumVersion(
5 currentLocation: string, 5 currentLocation: string,
6 ferdiumVersion: string, 6 ferdiumVersion: string,
7): string { 7): string {
8 const matches = currentLocation?.match(/version=([^&]*)/); 8 const matches = currentLocation.match(/version=([^&]*)/);
9 if (matches !== null) { 9 if (matches !== null) {
10 return `v${matches[1]}`; 10 return `v${matches[1]}`;
11 } 11 }
diff --git a/src/helpers/userAgent-helpers.ts b/src/helpers/userAgent-helpers.ts
index bc99fbc52..42e3a9851 100644
--- a/src/helpers/userAgent-helpers.ts
+++ b/src/helpers/userAgent-helpers.ts
@@ -13,7 +13,7 @@ import {
13function macOS() { 13function macOS() {
14 const version = macosVersion() ?? ''; 14 const version = macosVersion() ?? '';
15 let cpuName = cpus()[0].model.split(' ')[0]; 15 let cpuName = cpus()[0].model.split(' ')[0];
16 if (cpuName && /\(/.test(cpuName)) { 16 if (cpuName.includes('(')) {
17 // eslint-disable-next-line prefer-destructuring 17 // eslint-disable-next-line prefer-destructuring
18 cpuName = cpuName.split('(')[0]; 18 cpuName = cpuName.split('(')[0];
19 } 19 }