-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
57 lines (57 loc) · 1.76 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
{
"parserOptions": {
"ecmaVersion": "latest"
},
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es2022": true
},
"globals": { "_": true },
"plugins": ["import", "html"],
"extends": ["airbnb-base", "prettier"],
"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": ["error", { "devDependencies": true }],
"import/prefer-default-export": "off",
"import/extension": ["off"],
"max-len": [
"error",
{
"code": 120,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
] // prettier의 printWidth 옵션 대신 사용
},
"parser": "@babel/eslint-parser"
}