Skip to content

armgit / ente

Public Imported from GitHub
0

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

Update react refresh lint plugin

Manav Rathi38730c754a28
diff --git a/web/package-lock.json b/web/package-lock.json
index 5cc90fed0e..4801e67184 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -3619,6 +3619,7 @@
"version": "19.2.16",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.16.tgz",
"integrity": "sha512-esJiCAnl0kfpNdE69f3So4WJUXy95dLZydX0KwK46riIHDzHM7O9Vtf9xCHW0PXIqvgqNrswl522kA/5yx+F4w==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"csstype": "^3.2.2"
@@ -5568,13 +5569,13 @@
}
},
"node_modules/eslint-plugin-react-refresh": {
- "version": "0.4.26",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.26.tgz",
- "integrity": "sha512-1RETEylht2O6FM/MvgnyvT+8K21wLqDNg4qD51Zj3guhjt433XbnnkVttHMyaVyAFD03QSV4LPS5iE3VQmO7XQ==",
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.5.2.tgz",
+ "integrity": "sha512-hmgTH57GfzoTFjVN0yBwTggnsVUF2tcqi7RJZHqi9lIezSs4eFyAMktA68YD4r5kNw1mxyY4dmkyoFDb3FIqrA==",
"dev": true,
"license": "MIT",
"peerDependencies": {
- "eslint": ">=8.40"
+ "eslint": "^9 || ^10"
}
},
"node_modules/eslint-plugin-react/node_modules/resolve": {
@@ -10572,7 +10573,7 @@
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
"integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
- "devOptional": true,
+ "dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -11484,7 +11485,7 @@
"eslint": "9.39.4",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "5.2.0",
- "eslint-plugin-react-refresh": "0.4.26",
+ "eslint-plugin-react-refresh": "0.5.2",
"prettier": "3.6.2",
"prettier-plugin-organize-imports": "4.3.0",
"prettier-plugin-packagejson": "2.5.22",
diff --git a/web/packages/build-config/eslintrc-react.mjs b/web/packages/build-config/eslintrc-react.mjs
index c608ea26f4..759f8ca4e7 100644
--- a/web/packages/build-config/eslintrc-react.mjs
+++ b/web/packages/build-config/eslintrc-react.mjs
@@ -36,7 +36,7 @@ export default [
// create unnecessary helper files).
"react-refresh/only-export-components": [
"warn",
- { allowConstantExport: true },
+ { allowConstantExport: true, extraHOCs: ["styled"] },
],
},
},
diff --git a/web/packages/build-config/package.json b/web/packages/build-config/package.json
index b657da0eb7..c85f305c10 100644
--- a/web/packages/build-config/package.json
+++ b/web/packages/build-config/package.json
@@ -8,7 +8,7 @@
"eslint": "9.39.4",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "5.2.0",
- "eslint-plugin-react-refresh": "0.4.26",
+ "eslint-plugin-react-refresh": "0.5.2",
"prettier": "3.6.2",
"prettier-plugin-organize-imports": "4.3.0",
"prettier-plugin-packagejson": "2.5.22",
diff --git a/web/packages/gallery/services/download.ts b/web/packages/gallery/services/download.ts
index 1b537c0e7f..fb95b6ab4f 100644
--- a/web/packages/gallery/services/download.ts
+++ b/web/packages/gallery/services/download.ts
@@ -665,8 +665,15 @@ export class NetworkDownloadError extends Error {
// Cargo culted from
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#custom_error_types
- if (Error.captureStackTrace)
- Error.captureStackTrace(this, NetworkDownloadError);
+ const captureStackTrace = (
+ Error as {
+ captureStackTrace?: (
+ targetObject: object,
+ constructorOpt?: unknown,
+ ) => void;
+ }
+ ).captureStackTrace;
+ captureStackTrace?.(this, NetworkDownloadError);
this.error = e;
}