-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
129 lines (129 loc) · 3.64 KB
/
.eslintrc.cjs
File metadata and controls
129 lines (129 loc) · 3.64 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: [
"airbnb",
"prettier",
"plugin:import/recommended",
"plugin:@typescript-eslint/recommended"
],
plugins: [
"react",
"react-hooks",
"jsx-a11y",
"import",
"simple-import-sort",
"@typescript-eslint"
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: { jsx: true },
project: "./tsconfig.json",
},
settings: {
react: { version: "detect" },
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json",
},
alias: {
map: [["@", "./src"]],
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
node: { extensions: [".js", ".ts", ".jsx", ".tsx"] },
},
},
env: { browser: true, node: true, es2023: true, jest: true },
rules: {
"react/react-in-jsx-scope": "off",
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"import/no-unresolved": "off",
"no-underscore-dangle": "off",
"no-nested-ternary": "off",
"react/jsx-no-target-blank": ["error", { allowReferrer: true }],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"no-bitwise": "off",
"operator-assignment": "off",
"jsx-a11y/label-has-associated-control": "off",
"react/jsx-props-no-spreading": "off",
"no-return-assign": "off",
"no-unused-vars": "off",
"react/jsx-no-bind": "off",
"jsx-a11y/click-events-have-key-events": "off",
"no-continue": "off",
"no-multi-assign": "off",
"no-shadow": "off",
"import/order": "off",
"sort-imports": "off",
"no-unused-expressions": "off",
"no-plusplus": "off",
"no-param-reassign": "off",
"no-use-before-define": "off",
"default-case": "off",
"consistent-return": "off",
"prefer-destructuring": "off",
"import/prefer-default-export": "off",
"jsx-a11y/control-has-associated-label": "off",
"react/prop-types": "off",
"import/no-cycle": "off",
"import/no-absolute-path": "off",
"import/extensions": [
"error",
"ignorePackages",
{
js: "always",
ts: "never",
tsx: "never",
},
],
// TypeScript 관련 규칙 추가
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-expressions": "off",
"no-void": "off",
"prefer-const": "off",
"arrow-body-style": "off",
},
overrides: [
{
files: ["vite.config.*", "vite.*.config.*", "scripts/**", "tailwind.config.js"],
parser: "espree",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"import/namespace": "off",
"import/default": "off",
"import/no-duplicates": "off",
"import/no-self-import": "off",
"import/no-relative-packages": "off",
"import/no-named-as-default": "off",
"import/no-named-as-default-member": "off",
},
},
{
files: ["*.ts", "*.tsx"],
rules: {
"import/extensions": "off",
},
},
{
files: ["*.js", "*.jsx"],
rules: {
"import/extensions": "off",
},
},
],
ignorePatterns: ["node_modules", "dist", "build"],
};