commit cc021fac723fe8c6e80f8c7197bccc31707c9edf Author: duankunkun Date: Thu Jul 2 10:56:30 2026 +0800 upload eslint.config.mjs diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..7e10c44 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,31 @@ +import { dirname } from "path"; +import { fileURLToPath } from "url"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const compat = new FlatCompat({ + baseDirectory: __dirname, +}); + +const eslintConfig = [ + ...compat.extends("next/core-web-vitals", "next/typescript"), + { + rules: { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": "off", + "react-hooks/exhaustive-deps": "warn", + "react/no-unescaped-entities": "off", + "prefer-const": "warn" + } + }, + { + files: ["**/live-preview-frame.tsx"], + rules: { + "@next/next/no-img-element": "off" // Dynamic WebSocket stream images require regular img tag + } + } +]; + +export default eslintConfig;