-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.json
122 lines (121 loc) · 3.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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
"env": {
"es6": true,
"node": true,
"mocha": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended"],
"globals": {
},
"overrides": [
{
"files": ["*.ts", ".*.ts"],
"extends": "plugin:@typescript-eslint/recommended",
"rules":
{
"@typescript-eslint/semi": ["error"],
"@typescript-eslint/member-delimiter-style": ["error"],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-explicit-any": "off"
}
},
{
"files": ["*.spec.ts"],
"rules": {
"no-unused-expressions": "off"
}
}],
"rules": {
"max-lines": ["error", {
"max": 1200,
"skipBlankLines": false
}],
"max-depth": ["error", 10],
"no-console": "off",
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"brace-style": [
"error",
"1tbs"
],
"quotes": [
"error",
"single"
],
"semi": "off",
"no-unreachable": "warn",
"new-cap": "off",
"no-unused-vars": "warn",
"no-useless-escape": "warn",
"no-template-curly-in-string": "error",
"default-case": "error",
"no-empty-function": "error",
"no-eq-null": "error",
"camelcase": "error",
"handle-callback-err": ["error", "((_^.+Error)|(_error))"],
"no-use-before-define": "error",
"no-extra-parens": ["error", "all", {
"nestedBinaryExpressions": false,
"enforceForArrowConditionals": false,
"conditionalAssign": false
}],
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": "error",
"no-throw-literal": "error",
"no-useless-concat": "error",
"no-self-compare": "error",
"no-param-reassign": ["error",
{
"props": false
}
],
"no-return-await": "error",
"no-loop-func": "error",
"consistent-this": ["error", "refthis"],
"no-array-constructor": "error",
"no-plusplus": ["error", {
"allowForLoopAfterthoughts": true
}
],
"no-trailing-spaces": "error",
"no-await-in-loop": "off",
"no-restricted-syntax": [
"warn",
{
"selector": "CallExpression[callee.object.name='console']",
"message": "Please use the object 'logger' for logging in production"
}
],
"block-scoped-var": "error",
"consistent-return": "error",
"no-floating-decimal": "error",
"no-multi-str": "error",
"no-multi-spaces": "error",
"no-new": "error",
"no-new-func": "error",
"no-sequences": "error",
"no-return-assign": ["error", "always"],
"no-unmodified-loop-condition": "error",
"no-unused-expressions": ["error", {
"allowShortCircuit": true,
"allowTernary": true
}],
"no-useless-return": "error",
"no-void": "error",
"prefer-named-capture-group": "error",
"require-await": "error",
"wrap-iife": ["error", "inside"]
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 9
}
}