-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
58 lines (58 loc) · 1.58 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
module.exports = {
"env": {
"es2020": true,
"node": true,
"browser": true,
"shared-node-browser": true,
"jest": true,
"mongo": true,
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module",
"requireConfigFile": false,
},
"parser": "@babel/eslint-parser",
"rules": {
"indent": ["error", "tab", { "VariableDeclarator": "first" }],
"linebreak-style": ["error", "unix"],
"curly": "error",
"quotes": [
"warn",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true,
},
],
"quote-props": ["error", "always"],
"semi": ["error", "always"],
"no-console": ["warn", { "allow": ["warn", "error", "info"] }],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"no-unused-vars": [
"warn",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false,
},
],
"arrow-parens": ["error", "always"],
"arrow-body-style": ["warn", "always"],
"func-style": ["warn", "declaration", { "allowArrowFunctions": true }],
"no-confusing-arrow": ["error", { "allowParens": false }],
"prefer-arrow-callback": "warn",
"require-await": "error",
"operator-linebreak": ["warn", "before"],
"no-constant-condition": ["error", { "checkLoops": false }],
"no-throw-literal": "warn",
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-trailing-spaces": "error",
"no-multi-spaces": "error",
"arrow-spacing": "error",
"keyword-spacing": ["error", { "after": true, "before": true }],
"space-before-blocks": "error",
"space-before-function-paren": ["error", "always"],
},
};