-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
75 lines (75 loc) Β· 2.35 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:storybook/recommended",
"airbnb", // Airbnb μ€νμΌ κ°μ΄λ μΆκ°
"airbnb-typescript", // TypeScriptμ ν¨κ» μ¬μ©
"plugin:prettier/recommended", // Prettierμμ ν΅ν©
],
parserOptions: {
project: "./tsconfig.json",
},
ignorePatterns: ["dist", ".eslintrc.cjs", "firebase-messaging-sw.js"],
parser: "@typescript-eslint/parser",
plugins: [
"react-refresh",
"@typescript-eslint", // TypeScript ESLint νλ¬κ·ΈμΈ
],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
"prettier/prettier": "warn", // Prettier κ΄λ ¨ μ€λ₯λ₯Ό ESLint κ²½κ³ λ‘ νμ
"react/react-in-jsx-scope": "off", // React 17 μ΄μμμλ νμ μμ
"react/function-component-definition": "off", // νμ΄ν ν¨μ μ¬μ© νμ©
"import/extensions": "off",
"react/require-default-props": "off",
"react/prop-types": "off",
"no-console": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"react/no-unknown-property": "off",
"react/jsx-props-no-spreading": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-unused-vars": "off",
"jsx-a11y/click-events-have-key-events": "off",
"no-underscore-dangle": "off",
"no-alert": "off",
"react-hooks/exhaustive-deps": "off",
"react/no-array-index-key": "off",
"no-nested-ternary": "off",
"@typescript-eslint/no-use-before-define": "off",
"react/jsx-no-constructed-context-values": "off",
"import/prefer-default-export": "off",
"@typescript-eslint/no-unused-expressions": "off",
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: [
"**/src/api/mocks/**", // msw κ΄λ ¨ νμΌ μμΈ μ²λ¦¬
],
},
],
},
overrides: [
{
files: ["vite.config.ts", "public/mockServiceWorker.js"],
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
],
settings: {
node: {
allowModules: ["react-cookie"],
},
react: {
version: "detect", // React λ²μ μλ κ°μ§
},
},
};