-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
93 lines (84 loc) · 2.32 KB
/
.eslintrc.json
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"overrides": [
{
"files": ["**/*.mdx"],
"parser": "eslint-mdx",
"extends": ["plugin:mdx/recommended", "prettier"],
"globals": {
"CH": "readonly"
}
},
{
"files": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs"],
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json"
},
"rules": {
// const PostList: MonnomlogPage<IPostListProps> = (props) => { ... } 와 같이 썼을 때
// props 에 타입이 없다고 오진하고 에러를 발생시킴.
"react/prop-types": "off",
"no-unused-vars": "off",
"jsx-a11y/label-has-associated-control": [
2,
{
// "labelComponents": ["CustomInputLabel"],
// "labelAttributes": ["label"],
"controlComponents": [
/* "CustomInput"*/ "input",
"select",
"textarea"
],
"depth": 3
}
],
"object-shorthand": "error",
"no-useless-rename": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports"
}
],
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@next/next/no-img-element": "off",
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "(useMyStoreMemo|useMyOtherCustomHook)"
}
],
"react/jsx-key": ["error", { "checkFragmentShorthand": true }]
}
}
],
"ignorePatterns": [
"node_modules",
".next",
"out",
"vitest.config.ts",
"next-sitemap.config.js"
]
}