-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
125 lines (124 loc) · 2.93 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
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"],
"brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
"curly": ["warn", "all"],
"default-param-last": "warn",
"eol-last": ["warn", "always"],
"eqeqeq": ["error", "always"],
"indent": [
"warn",
"tab",
{
"MemberExpression": "off",
"SwitchCase": 1
}
],
"linebreak-style": [
"warn",
],
"max-classes-per-file": ["warn", 1],
"max-len": ["error", 120],
"no-console": "error",
"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/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"]
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "method",
"format": ["PascalCase", "camelCase"]
}
],
"@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"
},
"ignorePatterns": [
".eslintrc.js"
]
};