forked from asyncapi/modelina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
181 lines (181 loc) · 4.46 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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"sonarjs",
"security",
"github",
"jest",
"prettier",
"unused-imports"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:sonarjs/recommended",
"plugin:security/recommended",
"plugin:jest/recommended",
"prettier"
],
"env": {
"jest/globals": true
},
"rules": {
"strict": 0,
"github/array-foreach": 2,
"eol-last": ["error", "always"],
"@typescript-eslint/no-explicit-any": 0,
"require-await": "error",
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{ "allowArgumentsExplicitlyTypedAsAny": true }
],
"sonarjs/no-small-switch": "off",
"no-underscore-dangle": "error",
"no-process-exit": "error",
"no-warning-comments": "error",
"no-loop-func": "error",
"curly": ["error"],
"no-multi-spaces": "error",
"consistent-return": 0,
"consistent-this": [0, "self"],
"func-style": 0,
"max-nested-callbacks": ["error", 3],
"camelcase": 0,
"no-debugger": 1,
"no-empty": 1,
"no-invalid-regexp": 1,
"no-unused-expressions": 1,
"no-native-reassign": 1,
"no-fallthrough": 1,
"sonarjs/cognitive-complexity": 1,
"eqeqeq": 2,
"no-undef": 2,
"no-dupe-keys": 2,
"no-empty-character-class": 2,
"no-self-compare": 2,
"valid-typeof": 2,
"unused-imports/no-unused-imports": 2,
"handle-callback-err": 2,
"no-shadow-restricted-names": 2,
"no-new-require": 2,
"no-mixed-spaces-and-tabs": 2,
"block-scoped-var": 2,
"no-else-return": 2,
"no-throw-literal": 2,
"no-void": 2,
"radix": 2,
"wrap-iife": [2, "outside"],
"no-shadow": 0,
"no-path-concat": 2,
"valid-jsdoc": [
0,
{
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false
}
],
"no-spaced-func": 2,
"semi-spacing": 2,
"key-spacing": [
2,
{
"beforeColon": false,
"afterColon": true
}
],
"no-lonely-if": 2,
"no-floating-decimal": 2,
"comma-style": [2, "last"],
"no-multiple-empty-lines": [
2,
{
"max": 1
}
],
"no-nested-ternary": 2,
"operator-assignment": [2, "always"],
"padded-blocks": [2, "never"],
"quote-props": [2, "as-needed"],
"keyword-spacing": [
2,
{
"before": true,
"after": true,
"overrides": {}
}
],
"space-before-blocks": [2, "always"],
"array-bracket-spacing": [2, "never"],
"computed-property-spacing": [2, "never"],
"space-in-parens": [2, "never"],
"space-unary-ops": [
2,
{
"words": true,
"nonwords": false
}
],
"no-console": "error",
"wrap-regex": 2,
//"linebreak-style": ["error", "unix"],
"linebreak-style": 0,
"semi": [2, "always"],
"arrow-spacing": [
2,
{
"before": true,
"after": true
}
],
"no-class-assign": 2,
"no-const-assign": 2,
"no-this-before-super": 2,
"no-var": 2,
"object-shorthand": [2, "always"],
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-spread": 2,
"prefer-template": 2,
"prettier/prettier": 2,
"sonarjs/no-identical-functions": "off",
"sonarjs/prefer-single-boolean-return": "off",
"jest/valid-title": [
2,
{
"ignoreTypeOfDescribeName": true
}
]
},
"overrides": [
{
"files": "*.spec.ts",
"rules": {
"no-undef": "off",
"security/detect-non-literal-fs-filename": "off",
"sonarjs/no-duplicate-string": "off",
"security/detect-object-injection": "off",
"max-nested-callbacks": "off",
"sonarjs/no-identical-functions": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "off"
}
},
{
"files": "examples/**/*.ts",
"rules": {
"no-undef": "off",
"no-console": "off",
"security/detect-non-literal-fs-filename": "off",
"sonarjs/no-duplicate-string": "off",
"security/detect-object-injection": "off",
"max-nested-callbacks": "off",
"sonarjs/no-identical-functions": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}
]
}