24 lines
669 B
JavaScript
24 lines
669 B
JavaScript
import { defineConfig, globalIgnores } from "eslint/config";
|
|
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
import nextTs from "eslint-config-next/typescript";
|
|
import eslintConfigPrettier from "eslint-config-prettier";
|
|
|
|
const eslintConfig = defineConfig([
|
|
...nextVitals,
|
|
...nextTs,
|
|
// 关闭与 Prettier 冲突的格式化规则(须放在最后)。
|
|
eslintConfigPrettier,
|
|
// Override default ignores of eslint-config-next.
|
|
globalIgnores([
|
|
// Default ignores of eslint-config-next:
|
|
".next/**",
|
|
"out/**",
|
|
"build/**",
|
|
"next-env.d.ts",
|
|
// 测试覆盖率产物
|
|
"coverage/**",
|
|
]),
|
|
]);
|
|
|
|
export default eslintConfig;
|