-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
54 lines (48 loc) · 1.29 KB
/
eslint.config.mjs
File metadata and controls
54 lines (48 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 = [
// 1️⃣ [중요] 전역 무시 설정: 이 객체에는 'ignores' 외에 아무것도 넣지 마세요.
{
ignores: [
"**/node_modules/",
".next/",
"public/",
"dist/",
"supabase/",
"test/",
"**/*.test.tsx",
"**/*.test.ts",
"**/__tests__/**", // 폴더 통째로 무시하려면 이 패턴 추가
"jest.config.ts",
"jest.setup.ts",
],
},
// 2️⃣ 기존 Next.js 설정 확장
...compat.config({
extends: ["next/core-web-vitals", "next/typescript"],
rules: {
"react-hooks/exhaustive-deps": "off",
},
}),
// 3️⃣ 모든 파일에 적용할 공통 규칙
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], // 적용 대상을 명시적으로 지정
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
},
},
];
export default eslintConfig;