fix: robust eslint9 flat config to fix pipeline patch error
Some checks failed
Build & Deploy / 🔍 Prepare Environment (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Failing after 1m3s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / ⚡ PageSpeed (push) Has been cancelled
Build & Deploy / 🔔 Notifications (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled

This commit is contained in:
2026-02-07 16:37:58 +01:00
parent 958989165f
commit b4378d07f3
5 changed files with 272 additions and 195 deletions

52
eslint.config.js Normal file
View File

@@ -0,0 +1,52 @@
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import nextPlugin from "@next/eslint-plugin-next";
import reactPlugin from "eslint-plugin-react";
import hooksPlugin from "eslint-plugin-react-hooks";
import { FlatCompat } from "@eslint/eslintrc";
import { dirname } from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
export default tseslint.config(
{
ignores: ["**/dist/**", "**/node_modules/**", "**/.next/**", "**/out/**"],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["apps/web/**/*.{js,jsx,ts,tsx}"],
plugins: {
"react": reactPlugin,
"react-hooks": hooksPlugin,
"@next/next": nextPlugin,
},
rules: {
...reactPlugin.configs.recommended.rules,
...hooksPlugin.configs.recommended.rules,
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs["core-web-vitals"].rules,
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off",
"@next/next/no-img-element": "warn",
},
settings: {
react: {
version: "detect",
},
},
},
{
rules: {
"no-unused-vars": "warn",
"no-console": "off",
"@typescript-eslint/no-explicit-any": "off",
},
},
);