@neralabs/rerail-pack-typescript 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +36 -0
  4. package/licenses/eslint-plugin-vitest/LICENSE +21 -0
  5. package/licenses/eslint-plugin-vitest/UPSTREAM.md +103 -0
  6. package/licenses/typescript-eslint/LICENSE +21 -0
  7. package/licenses/typescript-eslint/UPSTREAM.md +1607 -0
  8. package/pack.json +189 -0
  9. package/package.json +30 -0
  10. package/rules/typescript-eslint-ban-tslint-comment.json +33 -0
  11. package/rules/typescript-eslint-consistent-type-definitions.json +1 -0
  12. package/rules/typescript-eslint-default-param-last.json +55 -0
  13. package/rules/typescript-eslint-no-array-constructor.json +238 -0
  14. package/rules/typescript-eslint-no-confusing-non-null-assertion.json +190 -0
  15. package/rules/typescript-eslint-no-dupe-class-members.json +1 -0
  16. package/rules/typescript-eslint-no-duplicate-enum-values.json +178 -0
  17. package/rules/typescript-eslint-no-empty-function.json +1 -0
  18. package/rules/typescript-eslint-no-extra-non-null-assertion.json +84 -0
  19. package/rules/typescript-eslint-no-import-type-side-effects.json +336 -0
  20. package/rules/typescript-eslint-no-namespace.json +157 -0
  21. package/rules/typescript-eslint-no-non-null-asserted-optional-chain.json +173 -0
  22. package/rules/typescript-eslint-no-non-null-assertion.json +195 -0
  23. package/rules/typescript-eslint-no-unnecessary-type-constraint.json +66 -0
  24. package/rules/typescript-eslint-no-unsafe-function-type.json +50 -0
  25. package/rules/typescript-eslint-no-unused-expressions.json +1 -0
  26. package/rules/typescript-eslint-no-useless-empty-export.json +38 -0
  27. package/rules/typescript-eslint-no-wrapper-object-types.json +568 -0
  28. package/rules/typescript-eslint-prefer-as-const.json +224 -0
  29. package/rules/typescript-eslint-prefer-enum-initializers.json +26 -0
  30. package/rules/typescript-eslint-prefer-literal-enum-member.json +1 -0
  31. package/rules/typescript-eslint-prefer-namespace-keyword.json +98 -0
package/pack.json ADDED
@@ -0,0 +1,189 @@
1
+ {
2
+ "format": "rerail.rule-pack/v1",
3
+ "id": "typescript",
4
+ "name": "TypeScript",
5
+ "category": "language",
6
+ "covers": "22 typescript-eslint rules ported to Rerail, 11 of them on and 11 off until turned on, each scored against the tool's own recorded findings on its test fixtures.",
7
+ "reason": "matches TypeScript",
8
+ "match": {
9
+ "any": [
10
+ {
11
+ "npmDependencies": [
12
+ "typescript"
13
+ ]
14
+ },
15
+ {
16
+ "files": [
17
+ "**/*.ts",
18
+ "**/*.mts",
19
+ "**/*.cts"
20
+ ],
21
+ "exclude": [
22
+ "**/*.d.ts"
23
+ ],
24
+ "label": "*.ts files"
25
+ },
26
+ {
27
+ "files": [
28
+ "**/*.tsx"
29
+ ],
30
+ "label": "*.tsx files"
31
+ }
32
+ ]
33
+ },
34
+ "rules": [
35
+ {
36
+ "id": "typescript-eslint-ban-tslint-comment",
37
+ "document": "rules/typescript-eslint-ban-tslint-comment.json",
38
+ "title": "typescript-eslint ban-tslint-comment: Disallow `// tslint:<rule-flag>` comments",
39
+ "group": "typescript-eslint",
40
+ "on": false
41
+ },
42
+ {
43
+ "id": "typescript-eslint-consistent-type-definitions",
44
+ "document": "rules/typescript-eslint-consistent-type-definitions.json",
45
+ "title": "typescript-eslint consistent-type-definitions: Enforce type definitions to consistently use either `interface` or `type`",
46
+ "group": "typescript-eslint",
47
+ "on": false
48
+ },
49
+ {
50
+ "id": "typescript-eslint-default-param-last",
51
+ "document": "rules/typescript-eslint-default-param-last.json",
52
+ "title": "typescript-eslint default-param-last: Enforce default parameters to be last",
53
+ "group": "typescript-eslint",
54
+ "on": false
55
+ },
56
+ {
57
+ "id": "typescript-eslint-no-array-constructor",
58
+ "document": "rules/typescript-eslint-no-array-constructor.json",
59
+ "title": "typescript-eslint no-array-constructor: Disallow generic `Array` constructors",
60
+ "group": "typescript-eslint"
61
+ },
62
+ {
63
+ "id": "typescript-eslint-no-confusing-non-null-assertion",
64
+ "document": "rules/typescript-eslint-no-confusing-non-null-assertion.json",
65
+ "title": "typescript-eslint no-confusing-non-null-assertion: Disallow non-null assertion in locations that may be confusing",
66
+ "group": "typescript-eslint",
67
+ "on": false
68
+ },
69
+ {
70
+ "id": "typescript-eslint-no-dupe-class-members",
71
+ "document": "rules/typescript-eslint-no-dupe-class-members.json",
72
+ "title": "typescript-eslint no-dupe-class-members: Disallow duplicate class members",
73
+ "group": "typescript-eslint",
74
+ "on": false
75
+ },
76
+ {
77
+ "id": "typescript-eslint-no-duplicate-enum-values",
78
+ "document": "rules/typescript-eslint-no-duplicate-enum-values.json",
79
+ "title": "typescript-eslint no-duplicate-enum-values: Disallow duplicate enum member values",
80
+ "group": "typescript-eslint"
81
+ },
82
+ {
83
+ "id": "typescript-eslint-no-empty-function",
84
+ "document": "rules/typescript-eslint-no-empty-function.json",
85
+ "title": "typescript-eslint no-empty-function: Disallow empty functions",
86
+ "group": "typescript-eslint",
87
+ "on": false
88
+ },
89
+ {
90
+ "id": "typescript-eslint-no-extra-non-null-assertion",
91
+ "document": "rules/typescript-eslint-no-extra-non-null-assertion.json",
92
+ "title": "typescript-eslint no-extra-non-null-assertion: Disallow extra non-null assertions",
93
+ "group": "typescript-eslint"
94
+ },
95
+ {
96
+ "id": "typescript-eslint-no-import-type-side-effects",
97
+ "document": "rules/typescript-eslint-no-import-type-side-effects.json",
98
+ "title": "typescript-eslint no-import-type-side-effects: Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers",
99
+ "group": "typescript-eslint",
100
+ "on": false
101
+ },
102
+ {
103
+ "id": "typescript-eslint-no-namespace",
104
+ "document": "rules/typescript-eslint-no-namespace.json",
105
+ "title": "typescript-eslint no-namespace: Disallow TypeScript namespaces",
106
+ "group": "typescript-eslint"
107
+ },
108
+ {
109
+ "id": "typescript-eslint-no-non-null-asserted-optional-chain",
110
+ "document": "rules/typescript-eslint-no-non-null-asserted-optional-chain.json",
111
+ "title": "typescript-eslint no-non-null-asserted-optional-chain: Disallow non-null assertions after an optional chain expression",
112
+ "group": "typescript-eslint"
113
+ },
114
+ {
115
+ "id": "typescript-eslint-no-non-null-assertion",
116
+ "document": "rules/typescript-eslint-no-non-null-assertion.json",
117
+ "title": "typescript-eslint no-non-null-assertion: Disallow non-null assertions using the ! postfix operator",
118
+ "group": "typescript-eslint",
119
+ "examples": {
120
+ "caught": {
121
+ "path": "src/config.ts",
122
+ "text": "export function port(env: Map<string, string>): string {\n return env.get(\"PORT\")!;\n}\n"
123
+ },
124
+ "passes": {
125
+ "path": "src/config.ts",
126
+ "text": "export function port(env: Map<string, string>): string {\n return env.get(\"PORT\") ?? \"8080\";\n}\n"
127
+ }
128
+ },
129
+ "on": false
130
+ },
131
+ {
132
+ "id": "typescript-eslint-no-unnecessary-type-constraint",
133
+ "document": "rules/typescript-eslint-no-unnecessary-type-constraint.json",
134
+ "title": "typescript-eslint no-unnecessary-type-constraint: Disallow unnecessary constraints on generic types",
135
+ "group": "typescript-eslint"
136
+ },
137
+ {
138
+ "id": "typescript-eslint-no-unsafe-function-type",
139
+ "document": "rules/typescript-eslint-no-unsafe-function-type.json",
140
+ "title": "typescript-eslint no-unsafe-function-type: Disallow using the unsafe built-in Function type",
141
+ "group": "typescript-eslint"
142
+ },
143
+ {
144
+ "id": "typescript-eslint-no-unused-expressions",
145
+ "document": "rules/typescript-eslint-no-unused-expressions.json",
146
+ "title": "typescript-eslint no-unused-expressions: Disallow unused expressions",
147
+ "group": "typescript-eslint"
148
+ },
149
+ {
150
+ "id": "typescript-eslint-no-useless-empty-export",
151
+ "document": "rules/typescript-eslint-no-useless-empty-export.json",
152
+ "title": "typescript-eslint no-useless-empty-export: Disallow empty exports that don't change anything in a module file",
153
+ "group": "typescript-eslint",
154
+ "on": false
155
+ },
156
+ {
157
+ "id": "typescript-eslint-no-wrapper-object-types",
158
+ "document": "rules/typescript-eslint-no-wrapper-object-types.json",
159
+ "title": "typescript-eslint no-wrapper-object-types: Disallow using confusing built-in primitive class wrappers",
160
+ "group": "typescript-eslint"
161
+ },
162
+ {
163
+ "id": "typescript-eslint-prefer-as-const",
164
+ "document": "rules/typescript-eslint-prefer-as-const.json",
165
+ "title": "typescript-eslint prefer-as-const: Enforce the use of as const over literal type",
166
+ "group": "typescript-eslint"
167
+ },
168
+ {
169
+ "id": "typescript-eslint-prefer-enum-initializers",
170
+ "document": "rules/typescript-eslint-prefer-enum-initializers.json",
171
+ "title": "typescript-eslint prefer-enum-initializers: Require each enum member value to be explicitly initialized",
172
+ "group": "typescript-eslint",
173
+ "on": false
174
+ },
175
+ {
176
+ "id": "typescript-eslint-prefer-literal-enum-member",
177
+ "document": "rules/typescript-eslint-prefer-literal-enum-member.json",
178
+ "title": "typescript-eslint prefer-literal-enum-member: Require all enum members to be literal values",
179
+ "group": "typescript-eslint",
180
+ "on": false
181
+ },
182
+ {
183
+ "id": "typescript-eslint-prefer-namespace-keyword",
184
+ "document": "rules/typescript-eslint-prefer-namespace-keyword.json",
185
+ "title": "typescript-eslint prefer-namespace-keyword: Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules",
186
+ "group": "typescript-eslint"
187
+ }
188
+ ]
189
+ }
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@neralabs/rerail-pack-typescript",
3
+ "version": "0.1.0",
4
+ "description": "Rerail rule pack: typescript-eslint rules ported to Rerail code rules.",
5
+ "license": "Apache-2.0 AND MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/neralabs/rerail.git",
9
+ "directory": "packs/typescript"
10
+ },
11
+ "files": [
12
+ "pack.json",
13
+ "rules",
14
+ "licenses",
15
+ "LICENSE",
16
+ "NOTICE",
17
+ "README.md"
18
+ ],
19
+ "peerDependencies": {
20
+ "@neralabs/rerail": ">=0.1.0-0 <0.2.0"
21
+ },
22
+ "peerDependenciesMeta": {
23
+ "@neralabs/rerail": {
24
+ "optional": true
25
+ }
26
+ },
27
+ "publishConfig": {
28
+ "access": "restricted"
29
+ }
30
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "typescript-eslint-ban-tslint-comment",
4
+ "revision": 1,
5
+ "mode": "steer",
6
+ "description": "Port of typescript-eslint's `ban-tslint-comment` (https://typescript-eslint.io/rules/ban-tslint-comment). Flags comments whose value matches TSLint's enable/disable directive regex; the fix deletes the comment.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "tslint-comment",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "kind": "comment",
21
+ "regex": "^(?P<TEXT>(//|/\\*)\\s*tslint:(enable|disable)(-(line|next-line))?(:|\\s|$|\\*/).*)$"
22
+ }
23
+ }
24
+ },
25
+ "violation": {
26
+ "anchor": "witness.span",
27
+ "code": "@typescript-eslint/ban-tslint-comment",
28
+ "message": "tslint comment detected: \"$TEXT\"",
29
+ "fix": ""
30
+ }
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"typescript-eslint-consistent-type-definitions","revision":2,"mode":"steer","description":"Port of typescript-eslint's `consistent-type-definitions` rule with its default option `interface` (https://typescript-eslint.io/rules/consistent-type-definitions). Flags type aliases whose type is an object literal type (through any parentheses) and fixes them to interfaces. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"option":{"type":"string","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"any":[{"has":{"kind":"type_parameters","pattern":"$TP","stopBy":"neighbor"}},{"not":{"has":{"kind":"type_parameters","stopBy":"neighbor"}}}]},"r2":{"inside":{"has":{"regex":"^global$","stopBy":"neighbor"},"kind":"ambient_declaration","stopBy":"end"}},"r3":{"has":{"kind":"type_identifier","pattern":"$N","stopBy":"neighbor"}},"r4":{"has":{"kind":"extends_type_clause","stopBy":"neighbor"}},"r5":{"has":{"kind":"interface_body","pattern":"$B","stopBy":"neighbor"}}}}},{"id":"interface-over-type","forbid":{"ast":{"language":"typescript","rule":{"kind":"type_alias_declaration","all":[{"matches":"r3"},{"has":{"matches":"object-type","stopBy":"neighbor"}},{"matches":"r1"}]},"utils":{"object-type":{"any":[{"kind":"object_type","pattern":"$B","not":{"has":{"kind":"index_signature","stopBy":"neighbor","has":{"kind":"mapped_type_clause","stopBy":"neighbor"}}}},{"kind":"parenthesized_type","has":{"matches":"object-type","stopBy":"neighbor"}}]}},"when":{"option":{"option":{"in":[null,"interface"]}}}}},"violation":{"anchor":"capture.N","code":"@typescript-eslint/consistent-type-definitions","message":"Use an `interface` instead of a `type`.","fix":"interface $N$TP $B"}},{"id":"type-over-interface","forbid":{"ast":{"language":"typescript","rule":{"kind":"interface_declaration","all":[{"matches":"r3"},{"matches":"r5"},{"matches":"r1"},{"not":{"any":[{"matches":"r4"},{"inside":{"kind":"export_statement","stopBy":"neighbor","has":{"regex":"^default$","stopBy":"neighbor"}}},{"matches":"r2"}]}}]},"when":{"option":{"option":"type"}}}},"violation":{"anchor":"capture.N","code":"@typescript-eslint/consistent-type-definitions","message":"Use a `type` instead of an `interface`.","fix":"type $N$TP = $B"}},{"id":"type-over-interface-unfixed","forbid":{"ast":{"language":"typescript","rule":{"kind":"interface_declaration","all":[{"matches":"r3"},{"any":[{"matches":"r4"},{"matches":"r2"}]}]},"when":{"option":{"option":"type"}}}},"violation":{"anchor":"capture.N","code":"@typescript-eslint/consistent-type-definitions","message":"Use a `type` instead of an `interface`."}},{"id":"type-over-interface-export-default","forbid":{"ast":{"language":"typescript","rule":{"kind":"export_statement","all":[{"has":{"regex":"^default$","stopBy":"neighbor"}},{"has":{"kind":"interface_declaration","stopBy":"neighbor","all":[{"matches":"r3"},{"matches":"r5"},{"matches":"r1"},{"not":{"any":[{"matches":"r4"},{"matches":"r2"}]}}]}}]},"when":{"option":{"option":"type"}}}},"violation":{"anchor":"capture.N","code":"@typescript-eslint/consistent-type-definitions","message":"Use a `type` instead of an `interface`.","fix":"type $N$TP = $B\nexport default $N"}}]}
@@ -0,0 +1,55 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "typescript-eslint-default-param-last",
4
+ "revision": 1,
5
+ "mode": "steer",
6
+ "description": "Port of typescript-eslint's `default-param-last` rule (https://typescript-eslint.io/rules/default-param-last), identical to the ESLint base port. Reports a defaulted or optional parameter of a function with a body that is followed by a required, non-rest parameter.",
7
+ "scope": { "include": ["**/*"], "exclude": [] },
8
+ "clauses": [
9
+ {
10
+ "id": "default-param-not-last",
11
+ "forbid": {
12
+ "ast": {
13
+ "language": "typescript",
14
+ "utils": {
15
+ "defaulted": {
16
+ "any": [
17
+ { "kind": "optional_parameter" },
18
+ { "kind": "required_parameter", "has": { "regex": "^=$", "stopBy": "neighbor" } }
19
+ ]
20
+ },
21
+ "plain": {
22
+ "kind": "required_parameter",
23
+ "not": {
24
+ "any": [
25
+ { "has": { "regex": "^=$", "stopBy": "neighbor" } },
26
+ { "has": { "kind": "rest_pattern", "stopBy": "neighbor" } }
27
+ ]
28
+ }
29
+ }
30
+ },
31
+ "rule": {
32
+ "matches": "defaulted",
33
+ "precedes": { "matches": "plain", "stopBy": "end" },
34
+ "inside": {
35
+ "kind": "formal_parameters",
36
+ "stopBy": "neighbor",
37
+ "inside": {
38
+ "any": [
39
+ { "kind": "function_declaration" },
40
+ { "kind": "function_expression" },
41
+ { "kind": "generator_function_declaration" },
42
+ { "kind": "generator_function" },
43
+ { "kind": "arrow_function" },
44
+ { "kind": "method_definition" }
45
+ ],
46
+ "stopBy": "neighbor"
47
+ }
48
+ }
49
+ }
50
+ }
51
+ },
52
+ "violation": { "anchor": "witness.span", "code": "@typescript-eslint/default-param-last", "message": "Default parameters should be last." }
53
+ }
54
+ ]
55
+ }
@@ -0,0 +1,238 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "typescript-eslint-no-array-constructor",
4
+ "revision": 1,
5
+ "mode": "steer",
6
+ "description": "Port of typescript-eslint's `no-array-constructor` rule (https://typescript-eslint.io/rules/no-array-constructor). Flags `Array(...)` / `new Array(...)` unless called with exactly one argument or type arguments (no scope check: typescript-eslint's version does not resolve `Array`), and fixes to an array literal. Comments inside the argument list are not carried by the `$$$A` capture, so those calls get no fix.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "array-constructor-fix",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "all": [
21
+ {
22
+ "all": [
23
+ {
24
+ "any": [
25
+ {
26
+ "kind": "call_expression"
27
+ },
28
+ {
29
+ "kind": "new_expression"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "has": {
35
+ "matches": "array-callee"
36
+ }
37
+ },
38
+ {
39
+ "not": {
40
+ "has": {
41
+ "kind": "type_arguments"
42
+ }
43
+ }
44
+ },
45
+ {
46
+ "not": {
47
+ "has": {
48
+ "kind": "template_string"
49
+ }
50
+ }
51
+ },
52
+ {
53
+ "not": {
54
+ "has": {
55
+ "kind": "arguments",
56
+ "count": {
57
+ "has": {
58
+ "matches": "arg"
59
+ },
60
+ "min": 1,
61
+ "max": 1
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "any": [
70
+ {
71
+ "has": {
72
+ "kind": "arguments",
73
+ "pattern": {
74
+ "context": "f($$$A)",
75
+ "selector": "arguments"
76
+ }
77
+ }
78
+ },
79
+ {
80
+ "not": {
81
+ "has": {
82
+ "kind": "arguments"
83
+ }
84
+ }
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ "not": {
90
+ "has": {
91
+ "kind": "arguments",
92
+ "has": {
93
+ "kind": "comment"
94
+ }
95
+ }
96
+ }
97
+ }
98
+ ]
99
+ },
100
+ "utils": {
101
+ "array-callee": {
102
+ "any": [
103
+ {
104
+ "kind": "identifier",
105
+ "regex": "^Array$"
106
+ },
107
+ {
108
+ "kind": "parenthesized_expression",
109
+ "has": {
110
+ "matches": "array-callee"
111
+ }
112
+ }
113
+ ]
114
+ },
115
+ "arg": {
116
+ "not": {
117
+ "any": [
118
+ {
119
+ "regex": "^[(),]$"
120
+ },
121
+ {
122
+ "kind": "comment"
123
+ }
124
+ ]
125
+ }
126
+ }
127
+ }
128
+ }
129
+ },
130
+ "violation": {
131
+ "anchor": "witness.span",
132
+ "code": "@typescript-eslint/no-array-constructor",
133
+ "message": "The array literal notation [] is preferable.",
134
+ "fix": "[$$$A]"
135
+ }
136
+ },
137
+ {
138
+ "id": "array-constructor",
139
+ "forbid": {
140
+ "ast": {
141
+ "language": "typescript",
142
+ "rule": {
143
+ "all": [
144
+ {
145
+ "all": [
146
+ {
147
+ "any": [
148
+ {
149
+ "kind": "call_expression"
150
+ },
151
+ {
152
+ "kind": "new_expression"
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ "has": {
158
+ "matches": "array-callee"
159
+ }
160
+ },
161
+ {
162
+ "not": {
163
+ "has": {
164
+ "kind": "type_arguments"
165
+ }
166
+ }
167
+ },
168
+ {
169
+ "not": {
170
+ "has": {
171
+ "kind": "template_string"
172
+ }
173
+ }
174
+ },
175
+ {
176
+ "not": {
177
+ "has": {
178
+ "kind": "arguments",
179
+ "count": {
180
+ "has": {
181
+ "matches": "arg"
182
+ },
183
+ "min": 1,
184
+ "max": 1
185
+ }
186
+ }
187
+ }
188
+ }
189
+ ]
190
+ },
191
+ {
192
+ "has": {
193
+ "kind": "arguments",
194
+ "has": {
195
+ "kind": "comment"
196
+ }
197
+ }
198
+ }
199
+ ]
200
+ },
201
+ "utils": {
202
+ "array-callee": {
203
+ "any": [
204
+ {
205
+ "kind": "identifier",
206
+ "regex": "^Array$"
207
+ },
208
+ {
209
+ "kind": "parenthesized_expression",
210
+ "has": {
211
+ "matches": "array-callee"
212
+ }
213
+ }
214
+ ]
215
+ },
216
+ "arg": {
217
+ "not": {
218
+ "any": [
219
+ {
220
+ "regex": "^[(),]$"
221
+ },
222
+ {
223
+ "kind": "comment"
224
+ }
225
+ ]
226
+ }
227
+ }
228
+ }
229
+ }
230
+ },
231
+ "violation": {
232
+ "anchor": "witness.span",
233
+ "code": "@typescript-eslint/no-array-constructor",
234
+ "message": "The array literal notation [] is preferable."
235
+ }
236
+ }
237
+ ]
238
+ }