[feature-274] remove sonarcloud code smells

This commit is contained in:
MathieuG-P
2023-11-07 23:44:30 +01:00
parent a8dd2d72f5
commit dee8d7a25f
5 changed files with 3 additions and 5 deletions
-1
View File
@@ -21,7 +21,6 @@ import { BSLauncherService } from "./services/bs-launcher/bs-launcher.service";
import { IpcRequest } from "shared/models/ipc";
import { LivShortcut } from "./services/liv/liv-shortcut.service";
import { SteamLauncherService } from "./services/bs-launcher/steam-launcher.service";
import { OculusLauncherService } from "./services/bs-launcher/oculus-launcher.service";
const isDebug = process.env.NODE_ENV === "development" || process.env.DEBUG_PROD === "true";
@@ -58,7 +58,7 @@ export class BsOculusDownloaderService {
log.info("Token contains | which usually indicates an application token which is not valid for user tokens");
return false;
}
if(token.match(/OC[0-9]{15}/)){
if(token.match(/OC\d{15}/)){
log.info("Token matches /OC[0-9}{15}/ which usually indicates a changed oculus store token");
return false;
}
+1 -1
View File
@@ -1,4 +1,4 @@
import { app, BrowserWindow, BrowserWindowConstructorOptions, shell, WebContents } from "electron";
import { app, BrowserWindow, BrowserWindowConstructorOptions, shell } from "electron";
import { resolveHtmlPath } from "../util";
import { UtilsService } from "./utils.service";
import { AppWindow } from "shared/models/window-manager/app-window.model";
@@ -1,4 +1,4 @@
import { forwardRef, HTMLProps } from "react";
import { HTMLProps } from "react";
export function OculusIcon(props: HTMLProps<SVGSVGElement>) {
return (
@@ -11,7 +11,6 @@ import { useService } from "renderer/hooks/use-service.hook";
import { BSVersion } from "shared/bs-version.interface";
import { useObservable } from "renderer/hooks/use-observable.hook";
import { BsDownloaderService } from "renderer/services/bs-version-download/bs-downloader.service";
import { BsStore } from "shared/models/bs-store.enum";
export const AvailableVersionsContext = createContext<{ selectedVersion: BSVersion; setSelectedVersion: (version: BSVersion) => void }>(null);