Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Apply autofixes prefer-regexp-exec

Manav Rathif5512d3cd8c2
diff --git a/web/apps/photos/eslint.config.mjs b/web/apps/photos/eslint.config.mjs
index 159a00a6f0..31733fe465 100644
--- a/web/apps/photos/eslint.config.mjs
+++ b/web/apps/photos/eslint.config.mjs
@@ -51,7 +51,7 @@ export default [
"react-refresh/only-export-components": "off",
/** TODO: New during eslint 8=>9 migration */
"@typescript-eslint/no-unused-expressions": "off",
- "@typescript-eslint/prefer-regexp-exec": "off",
+
},
},
];
diff --git a/web/apps/photos/src/services/export/index.ts b/web/apps/photos/src/services/export/index.ts
index 7b956c17e9..5f91e6163a 100644
--- a/web/apps/photos/src/services/export/index.ts
+++ b/web/apps/photos/src/services/export/index.ts
@@ -1181,7 +1181,7 @@ const getRenamedExportedCollections = (
if (currentExportName === collectionExportName) {
return false;
}
- const hasNumberedSuffix = currentExportName.match(/\(\d+\)$/);
+ const hasNumberedSuffix = /\(\d+\)$/.exec(currentExportName);
const currentExportNameWithoutNumberedSuffix = hasNumberedSuffix
? currentExportName.replace(/\(\d+\)$/, "")
: currentExportName;
diff --git a/web/apps/photos/src/services/upload/takeout.ts b/web/apps/photos/src/services/upload/takeout.ts
index 22c24d7110..bb30ed11d7 100644
--- a/web/apps/photos/src/services/upload/takeout.ts
+++ b/web/apps/photos/src/services/upload/takeout.ts
@@ -29,7 +29,7 @@ export const getMetadataJSONMapKeyForJSON = (
jsonFileName: string,
) => {
let title = jsonFileName.slice(0, -1 * ".json".length);
- const endsWithNumberedSuffixWithBrackets = title.match(/\(\d+\)$/);
+ const endsWithNumberedSuffixWithBrackets = /\(\d+\)$/.exec(title);
if (endsWithNumberedSuffixWithBrackets) {
title = title.slice(
0,