2025-04-30 17:36:46 +08:00
|
|
|
import { dirname } from 'path';
|
|
|
|
|
import { fileURLToPath } from 'url';
|
|
|
|
|
import { FlatCompat } from '@eslint/eslintrc';
|
|
|
|
|
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
2025-03-26 17:01:22 +08:00
|
|
|
|
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
|
|
|
const __dirname = dirname(__filename);
|
|
|
|
|
|
|
|
|
|
const compat = new FlatCompat({
|
|
|
|
|
baseDirectory: __dirname,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const eslintConfig = [
|
2025-04-30 17:36:46 +08:00
|
|
|
...compat.extends('next/core-web-vitals', 'next/typescript'),
|
|
|
|
|
eslintPluginPrettierRecommended,
|
2025-03-26 17:01:22 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export default eslintConfig;
|