-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
138 lines (132 loc) · 4.5 KB
/
.eslintrc.js
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: "tsconfig.eslint.json",
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
'eslint-plugin-tsdoc'
],
env: {
browser: true,
node: true,
es6: true,
jest: true,
},
overrides: [
{
files: [
"test/**/*.ts"
],
env: {
jest: true
},
extends: ["plugin:jest/all"],
plugins: ["jest"],
rules: {
"jest/no-disabled-tests": "warn",
"jest/prefer-spy-on": "off",
"jest/prefer-expect-assertions": "off",
"jest/no-hooks": "off",
"jest/require-top-level-describe": "off",
"jest/consistent-test-it": ["error", {"fn": "test", "withinDescribe": "test"}],
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/await-thenable": "off",
"max-lines-per-function": "off",
"object-property-newline": "off",
"complexity": ["error", { "max": 20 }],
}
}
],
extends: [
"eslint:all",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/all",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
"id-length": "off",
"no-new": "off",
"no-underscore-dangle": "off",
"no-useless-constructor": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"tsdoc/syntax": "error",
"no-duplicate-imports": "off",
"eslint/default-case": "off",
"@typescript-eslint/lines-around-comment": "off",
"@typescript-eslint/max-params": "off",
"@typescript-eslint/class-methods-use-this": "off",
"object-property-newline": "off",
"func-style": "off",
"max-lines": "off",
"prefer-destructuring": "off",
"no-lonely-if": "off",
"multiline-comment-style": "off",
"capitalized-comments": "off",
"no-plusplus": "off",
"no-extra-parens": "off",
"dot-location": "off",
"sort-keys": "off",
"array-element-newline": "off",
"function-paren-newline": "off",
"max-params": "off",
"no-ternary": "off",
"multiline-ternary": "off",
"max-classes-per-file": "off",
"max-statements": "off",
"init-declarations": "off",
"keyword-spacing": "off",
"space-before-function-paren": "off",
"function-call-argument-newline": "off",
"no-mixed-operators": "off",
"class-methods-use-this": "off",
"lines-between-class-members": "off",
"no-unused-expressions": "off",
"no-undefined": "off",
"padded-blocks": "off",
"lines-around-comment": "off",
"sort-imports": "off",
"no-magic-numbers": "off",
"indent": "off",
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/method-signature-style": "off",
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-invalid-this": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/typedef": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/array-type": ["error", { "default": "generic"}],
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }],
"@typescript-eslint/indent": ["error", 4, {
"FunctionDeclaration": { "parameters": "first" },
"FunctionExpression": { "parameters": "first" }
}],
"@typescript-eslint/prefer-nullish-coalescing": ["error",
{"ignoreMixedLogicalExpressions" : false, "ignoreConditionalTests": false}],
"@typescript-eslint/quotes": [
"error",
"double"
],
"arrow-parens": ["error", "as-needed"],
"complexity": ["error", { "max": 10 }],
"eqeqeq": ["error", "smart"],
"max-len": ["error", { "code": 150 }],
"no-multiple-empty-lines": ["error", { "max": 2 }],
"no-restricted-syntax": ["error", "ForInStatement"],
"one-var": ["error", "never"],
}
};