From d54ff9a949c1fc4be63f02eda3fd4b917f8149ca Mon Sep 17 00:00:00 2001 From: Moyasee Date: Sun, 9 Nov 2025 15:34:24 +0200 Subject: [PATCH] fix: eslint issues --- src/main/helpers/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/helpers/index.ts b/src/main/helpers/index.ts index 550db81f..664dbd78 100644 --- a/src/main/helpers/index.ts +++ b/src/main/helpers/index.ts @@ -33,7 +33,7 @@ export const isPortableVersion = () => { }; export const normalizePath = (str: string) => - path.posix.normalize(str).replace(/\\/g, "/"); + path.posix.normalize(str).replaceAll("\\", "/"); export const addTrailingSlash = (str: string) => str.endsWith("/") ? str : `${str}/`; @@ -41,10 +41,10 @@ export const addTrailingSlash = (str: string) => const sanitizeFolderName = (name: string): string => { return name .toLowerCase() - .replace(/[^a-z0-9-_\s]/g, "") - .replace(/\s+/g, "-") - .replace(/-+/g, "-") - .replace(/^-|-$/g, ""); + .replaceAll(/[^a-z0-9-_\s]/g, "") + .replaceAll(/\s+/g, "-") + .replaceAll(/-+/g, "-") + .replaceAll(/(^-|-$)/g, ""); }; export const getThemePath = (themeId: string, themeName?: string): string => {