-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
68 lines (68 loc) ยท 2.24 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
{
"parser": "@babel/eslint-parser",
// "parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest"
},
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es2022": true
},
"globals": { "_": true },
"plugins": ["import", "html"],
"extends": ["airbnb-base", "prettier", "react-app"],
"rules": {
"import/no-unresolved": "off",
"import/extensions": "off",
// "better-styled-components/sort-declarations-alphabetically": 2,
// "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 }],
"max-len": [
"error",
{
"code": 120,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
], // prettier์ printWidth ์ต์
๋์ ์ฌ์ฉ
"import/no-anonymous-default-export": ["error", {
"allowArray": false,
"allowArrowFunction": false,
"allowAnonymousClass": false,
"allowAnonymousFunction": false,
"allowCallExpression": true, // The true value here is for backward compatibility
"allowLiteral": false,
"allowObject": true
}] // default export ๊ด๋ จ
}
}