-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
70 lines (64 loc) · 2.05 KB
/
Copy patheslint.config.mjs
File metadata and controls
70 lines (64 loc) · 2.05 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import tseslint from "typescript-eslint";
import eslint from "@eslint/js";
import react from "eslint-plugin-react";
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
import next from "@next/eslint-plugin-next";
import eslintPluginPrettier from "eslint-plugin-prettier";
import globals from "globals";
export default tseslint.config(
{
ignores: [
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"**/public/**",
"**/.next/**",
"**/.github/**",
"**/tailwind.config.js",
"**/postcss.config.js",
"**/next.config.js",
"**/next-env.d.ts",
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.ts", "**/*.tsx"],
plugins: {
"@typescript-eslint": typescriptPlugin,
react,
next,
prettier: eslintPluginPrettier,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
},
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off", // React import를 사용하지 않도록 설정
"prettier/prettier": "warn", // Prettier 규칙을 ESLint에서 경고로 설정
"@typescript-eslint/no-unused-vars": "off", // 사용하지 않는 변수 허용
"@typescript-eslint/no-explicit-any": "off", // any 타입 사용 허용
"@typescript-eslint/no-require-imports": "off", // require 사용 허용
"react/no-unescaped-entities": "off", // React 컴포넌트에서 엔티티를 직접 사용하는 것을 허용
"@typescript-eslint/no-non-null-assertion": "off", // non-null assertion 사용 허용
"@next/next/no-page-custom-font": "off", // next.js에서 커스텀 폰트 사용을 허용
"react/jsx-filename-extension": [
1,
{
extensions: [".ts", ".tsx"],
}, // ts파일에서 tsx 문법 사용 허용
],
},
},
{
extends: [tseslint.configs.disableTypeChecked],
},
);