Skip to content

armgit / ente

Public Imported from GitHub
0

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

Chain

Manav Rathi56b72bd55b79
diff --git a/web/apps/payments/.eslintrc.cjs b/web/apps/payments/.eslintrc.cjs
deleted file mode 100644
index 99b4b9226c..0000000000
--- a/web/apps/payments/.eslintrc.cjs
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- extends: ["@/build-config/eslintrc-vite"],
-};
diff --git a/web/apps/payments/eslint.config.mjs b/web/apps/payments/eslint.config.mjs
new file mode 100644
index 0000000000..33ed94f25d
--- /dev/null
+++ b/web/apps/payments/eslint.config.mjs
@@ -0,0 +1,7 @@
+// module.exports = {
+// extends: ["@/build-config/eslintrc-vite"],
+// };
+
+import config from "@/build-config/eslintrc-vite.mjs";
+
+export default config;
diff --git a/web/packages/build-config/eslintrc-react.js b/web/packages/build-config/eslintrc-react.js
deleted file mode 100644
index a275ad9f74..0000000000
--- a/web/packages/build-config/eslintrc-react.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* eslint-env node */
-module.exports = {
- extends: [
- "./eslintrc-base.js",
- "plugin:react/recommended",
- "plugin:react-hooks/recommended",
- ],
- plugins: ["react-refresh"],
- settings: { react: { version: "18.2" } },
- rules: {
- /* The rule is misguided - only the opener should be omitted, not the
- referrer. */
- "react/jsx-no-target-blank": ["warn", { allowReferrer: true }],
- /* Otherwise we need to do unnecessary boilerplating when using memo. */
- "react/display-name": "off",
- /* Apparently Fast refresh only works if a file only exports components,
- and this rule warns about that. Constants are okay though (otherwise
- we'll need to create unnecessary helper files). */
- "react-refresh/only-export-components": [
- "warn",
- { allowConstantExport: true },
- ],
- /* Next.js supports the JSX transform introduced in React 17 */
- "react/react-in-jsx-scope": "off",
- /* Without React in scope, this rule starts causing false positives (We
- don't use prop types in our own code anyways). */
- "react/prop-types": "off",
- },
-};
diff --git a/web/packages/build-config/eslintrc-react.mjs b/web/packages/build-config/eslintrc-react.mjs
new file mode 100644
index 0000000000..270dafaf57
--- /dev/null
+++ b/web/packages/build-config/eslintrc-react.mjs
@@ -0,0 +1,33 @@
+import config from "./eslintrc-base.mjs";
+
+export default config;
+
+// /* eslint-env node */
+// module.exports = {
+// extends: [
+// "./eslintrc-base.js",
+// "plugin:react/recommended",
+// "plugin:react-hooks/recommended",
+// ],
+// plugins: ["react-refresh"],
+// settings: { react: { version: "18.2" } },
+// rules: {
+// /* The rule is misguided - only the opener should be omitted, not the
+// referrer. */
+// "react/jsx-no-target-blank": ["warn", { allowReferrer: true }],
+// /* Otherwise we need to do unnecessary boilerplating when using memo. */
+// "react/display-name": "off",
+// /* Apparently Fast refresh only works if a file only exports components,
+// and this rule warns about that. Constants are okay though (otherwise
+// we'll need to create unnecessary helper files). */
+// "react-refresh/only-export-components": [
+// "warn",
+// { allowConstantExport: true },
+// ],
+// /* Next.js supports the JSX transform introduced in React 17 */
+// "react/react-in-jsx-scope": "off",
+// /* Without React in scope, this rule starts causing false positives (We
+// don't use prop types in our own code anyways). */
+// "react/prop-types": "off",
+// },
+// };
diff --git a/web/packages/build-config/eslintrc-vite.js b/web/packages/build-config/eslintrc-vite.js
deleted file mode 100644
index 37032546bd..0000000000
--- a/web/packages/build-config/eslintrc-vite.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/* eslint-env node */
-module.exports = {
- extends: ["./eslintrc-react.js", "plugin:react/jsx-runtime"],
- ignorePatterns: [".eslintrc.cjs", "vite.config.ts", "dist"],
-};
diff --git a/web/packages/build-config/eslintrc-vite.mjs b/web/packages/build-config/eslintrc-vite.mjs
new file mode 100644
index 0000000000..73e64c1fcd
--- /dev/null
+++ b/web/packages/build-config/eslintrc-vite.mjs
@@ -0,0 +1,9 @@
+import config from "./eslintrc-react.mjs";
+
+export default config;
+
+// /* eslint-env node */
+// module.exports = {
+// extends: ["./eslintrc-react.js", "plugin:react/jsx-runtime"],
+// ignorePatterns: [".eslintrc.cjs", "vite.config.ts", "dist"],
+// };
diff --git a/web/packages/build-config/tsconfig.json b/web/packages/build-config/tsconfig.json
index 2f2ab5c97f..25e05fc8ad 100644
--- a/web/packages/build-config/tsconfig.json
+++ b/web/packages/build-config/tsconfig.json
@@ -6,5 +6,5 @@
"checkJs": true,
"esModuleInterop": true
},
- "include": ["*.js", "eslintrc-base.mjs"]
+ "include": ["*.js", "eslintrc-base.mjs", "eslintrc-react.mjs", "eslintrc-vite.mjs"]
}