-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
102 lines (99 loc) · 3.56 KB
/
.eslintrc
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
{
"root": true,
"env": {
"node": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "unused-imports"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"ignorePatterns": ["webpack.config.js", "*.md", "*.d.ts", "*.js", "*.py"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-inferrable-types": 0,
"prefer-const": "error",
"no-async-promise-executor": "off",
"no-case-declarations": "off",
"prefer-spread": 0,
"no-useless-escape": 0,
"no-empty": 0,
"no-console": 0,
"curly": "error",
"no-multi-spaces": "error",
"block-spacing": "error",
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"padded-blocks": ["error", "never"],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
{
"blankLine": "any",
"prev": ["const", "let", "var"],
"next": ["const", "let", "var"]
},
{ "blankLine": "always", "prev": ["case", "default"], "next": "*" },
{
"blankLine": "always",
"prev": [
"block-like",
"multiline-block-like",
"multiline-expression",
"multiline-const",
"multiline-let",
"multiline-var",
"export",
"function",
"class"
],
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": [
"block-like",
"multiline-block-like",
"multiline-expression",
"multiline-const",
"multiline-let",
"multiline-var",
"function",
"export",
"class",
"return"
]
}
],
"space-before-blocks": "error",
"no-confusing-arrow": "error",
"no-var": "error",
"prefer-template": "error",
"no-fallthrough": "off",
"lines-around-comment": "off",
// disable default
"brace-style": "off",
"comma-spacing": "off",
"lines-between-class-members": "off",
// enable typescript
"unused-imports/no-unused-imports": "warn",
"@typescript-eslint/no-non-null-assertion": 1,
"@typescript-eslint/brace-style": ["error", "1tbs", { "allowSingleLine": false }],
"@typescript-eslint/comma-spacing": ["error", { "before": false, "after": true }],
"@typescript-eslint/lines-between-class-members": [
"error",
"always",
{ "exceptAfterSingleLine": true, "exceptAfterOverload": true }
]
}
}