forked from kosco-project/kosco-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
49 lines (49 loc) · 1.58 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
{
"parserOptions": {
"ecmaVersion": 11
},
"env": {
"browser": true,
"node": true
},
"globals": {
"_": false
},
"plugins": ["import", "html"],
"extends": "airbnb-base",
"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)
"camelcase": "off",
"no-unused-vars": 0,
"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 }],
"max-len": ["error", {
"code": 110,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}] // prettier의 printWidth 옵션 대신 사용
}
}