-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
120 lines (120 loc) · 3.78 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
{
"root": true,
"env": {
"node": true,
"es2021": true
},
"parserOptions": {
"sourceType": "module"
},
"plugins": [
"jsdoc"
],
"extends": [
"eslint:recommended",
"plugin:jsdoc/recommended"
],
"settings": {
"jsdoc": {
"mode": "closure"
}
},
"rules": {
"brace-style": ["warn", "1tbs", { "allowSingleLine": true }],
"comma-dangle": ["warn", "always-multiline"],
"comma-spacing": "warn",
"comma-style": "warn",
"curly": ["warn", "multi-line", "consistent"],
"dot-location": ["warn", "property"],
"eqeqeq": "warn",
"handle-callback-err": "off",
"indent": ["warn", 4],
"keyword-spacing": "warn",
"max-nested-callbacks": ["warn", { "max": 4 }],
"max-statements-per-line": ["warn", { "max": 2 }],
"no-console": "off",
"no-constant-condition": ["warn", { "checkLoops": false }],
"no-empty": "warn",
"no-empty-function": "warn",
"no-fallthrough": "warn",
"no-floating-decimal": "warn",
"no-inline-comments": ["warn", { "ignorePattern": "^\\*"}],
"no-lonely-if": "warn",
"no-multi-spaces": "warn",
"no-multiple-empty-lines": ["warn", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"no-shadow": ["warn", { "allow": ["err", "resolve", "reject"] }],
"no-trailing-spaces": ["warn"],
"no-unused-labels": "warn",
"no-unused-vars": "off",
"no-var": "warn",
"object-curly-spacing": ["warn", "always"],
"prefer-const": "warn",
"quotes": ["warn", "double", { "allowTemplateLiterals": true }],
"semi": ["warn", "always"],
"space-before-blocks": "warn",
"space-before-function-paren": ["warn", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": "warn",
"space-unary-ops": "warn",
"spaced-comment": "warn",
"yoda": "warn",
"jsdoc/require-jsdoc": ["warn", {"exemptEmptyFunctions": true}],
"jsdoc/require-param-description": "off",
"jsdoc/require-property-description": "off",
"jsdoc/require-returns-description": "off"
},
"overrides": [
{
"files": ["*.{ts,tsx}"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"tsconfigRootDir": "./",
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "off",
"jsdoc/require-returns": "off",
"@typescript-eslint/no-unused-vars": "off",
"object-curly-spacing": "off",
"@typescript-eslint/object-curly-spacing": ["warn", "always"],
"semi": "off",
"@typescript-eslint/semi": "warn",
"@typescript-eslint/no-extra-semi": "warn",
"comma-dangle": "off",
"@typescript-eslint/comma-dangle": ["warn", "always-multiline"],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["warn", { "allow": ["err", "resolve", "reject"] }],
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/type-annotation-spacing": "warn",
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/adjacent-overload-signatures": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/no-unsafe-argument": "error",
"keyword-spacing": "off",
"@typescript-eslint/keyword-spacing": ["warn"],
"@typescript-eslint/strict-boolean-expressions": ["warn", {
"allowString": false,
"allowNumber": false,
"allowNullableObject": false
}]
}
}
]
}