-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
92 lines (91 loc) · 2.3 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
module.exports = {
"root": true,
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
//"plugin:@typescript-eslint/recommended"
//"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"tsconfigRootDir": __dirname,
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"block-spacing": ["warn", "always"],
"curly": ["warn", "all"],
"default-param-last": "warn",
"eol-last": ["warn", "always"],
"eqeqeq": ["error", "always"],
"indent": [
"warn",
"tab",
{
"MemberExpression": "off",
"SwitchCase": 1
}
],
"linebreak-style": [
"warn",
"windows"
],
"max-classes-per-file": ["warn", 1],
"max-len": ["error", 120],
"no-div-regex": "error",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-labels": "error",
"no-loop-func": "error",
"no-multi-spaces": ["warn", {"ignoreEOLComments": true}],
"no-multiple-empty-lines": "warn",
"no-new": "error",
"no-self-compare": "warn",
"no-sequences": "error",
"no-shadow": "warn",
"no-unmodified-loop-condition": "error",
"no-void": "error",
"no-warning-comments": ["warn", {"terms": ["todo", "fixme", "tslint"]}],
"prefer-const": "warn",
"prefer-regex-literals": "warn",
"require-unicode-regexp": "error",
"yoda": "warn",
"@typescript-eslint/array-type": [
"error",
{ "default": "array-simple" }
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Object": "Use {} instead.",
"String": "Use 'string' instead.",
"Number": "Use 'number' instead.",
"Boolean": "Use 'boolean' instead."
}
}
],
"@typescript-eslint/camelcase": ["warn", {"allow": ["^_[a-z][A-Za-z0-9]*$"]}],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "args": "none" }
],
"@typescript-eslint/unbound-method": "error"
}
};