2025-12-09 09:13:46 +00:00
|
|
|
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
|
|
|
|
|
import nextTypescript from "eslint-config-next/typescript";
|
2025-11-28 06:31:36 +00:00
|
|
|
import { dirname } from 'path'
|
|
|
|
|
import { fileURLToPath } from 'url'
|
|
|
|
|
import prettier from 'eslint-config-prettier'
|
|
|
|
|
import importQuotes from 'eslint-plugin-import-quotes'
|
2025-11-13 08:38:25 +00:00
|
|
|
|
2025-11-28 06:31:36 +00:00
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
|
|
|
const __dirname = dirname(__filename)
|
2025-11-13 08:38:25 +00:00
|
|
|
|
2025-12-09 09:13:46 +00:00
|
|
|
const eslintConfig = [...nextCoreWebVitals, ...nextTypescript, prettier, {
|
|
|
|
|
plugins: { 'import-quotes': importQuotes },
|
|
|
|
|
rules: {
|
|
|
|
|
// 👇 import 使用双引号
|
|
|
|
|
'import-quotes/import-quotes': ['error', 'double'],
|
2025-11-28 06:31:36 +00:00
|
|
|
},
|
2025-12-09 09:13:46 +00:00
|
|
|
}, {
|
|
|
|
|
ignores: ["node_modules/**", ".next/**", "out/**", "build/**", "next-env.d.ts"]
|
|
|
|
|
}]
|
2025-11-28 06:31:36 +00:00
|
|
|
|
|
|
|
|
export default eslintConfig
|