-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy path.eslintrc.json
107 lines (104 loc) · 3.01 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"parserOptions": {
"ecmaVersion": "latest",
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"octalLiterals": true,
"regexUFlag": true,
"regexYFlag": true,
"spread": true,
"superInFunctions": true,
"templateStrings": true,
"unicodeCodePointEscapes": true,
"globalReturn": true,
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es2022": true,
"es6": true
},
"globals": { "_": true },
"plugins": ["import", "html", "markdown", "mdx", "react"],
"extends": ["eslint:recommended", "airbnb-base", "plugin:prettier/recommended", "plugin:react/recommended", "plugin:react/jsx-runtime"],
"rules": {
// "off" or 0 - turn the rule off
// "warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
// "error" or 2 - turn the rule on as an error (exit code is 1 when triggered)
// "no-var": "off",
"no-console": "warn",
"no-plusplus": "off",
"no-shadow": "off",
"vars-on-top": "off",
"no-underscore-dangle": "off", // var _foo;
"comma-dangle": "off",
"func-names": "off", // setTimeout(function () {}, 0);
"prefer-template": "off",
"no-nested-ternary": "off",
"max-classes-per-file": "off",
"consistent-return": "off",
"no-restricted-syntax": ["off", "ForOfStatement"], // disallow specified syntax(ex. WithStatement)
"prefer-arrow-callback": "error", // Require using arrow functions for callbacks
"require-await": "error",
"arrow-parens": ["error", "as-needed"], // a => {}
"no-param-reassign": ["error", { "props": false }],
"no-unused-expressions": [
"error",
{
"allowTernary": true, // a || b
"allowShortCircuit": true, // a ? b : 0
"allowTaggedTemplates": true
}
],
"import/no-extraneous-dependencies": ["off", { "devDependencies": true }],
"max-len": [
"error",
{
"code": 300,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
], // prettier의 printWidth 옵션 대신 사용
"react/prop-types": 0,
"import/no-unresolved": 0,
"import/extensions": 0,
"no-return-await": 0,
"react/display-name": 0,
"prettier/prettier": ["error", { "endOfLine": "auto" }]
},
"overrides": [
{
"files": ["**/*.md"],
"processor": "markdown/markdown"
},
{
"files": ["**/*.mdx"],
"extends": "plugin:mdx/recommended"
},
{
"files": ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
"plugins": ["react"]
}
],
"settings": {
"react": {
"version": "detect"
}
}
}