@cerios/sparta-lint-rules 0.0.1 → 0.0.3
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.
- package/LICENSE +7 -7
- package/README.md +87 -40
- package/dist/conventions-DK3A7JWL.d.cts +97 -0
- package/dist/conventions-DK3A7JWL.d.mts +97 -0
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.mts +16 -2
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/oxlint.cjs +2 -1
- package/dist/oxlint.cjs.map +1 -1
- package/dist/oxlint.d.cts +18 -1
- package/dist/oxlint.d.mts +19 -2
- package/dist/oxlint.mjs +2 -1
- package/dist/oxlint.mjs.map +1 -1
- package/dist/{plugin-types-CgeW0cQl.d.cts → plugin-types-7QJakt0Z.d.cts} +10 -4
- package/dist/{plugin-types-CgeW0cQl.d.mts → plugin-types-7QJakt0Z.d.mts} +10 -4
- package/dist/{rules-COk7kmEU.cjs → rules-5VZcw4ds.cjs} +868 -175
- package/dist/rules-5VZcw4ds.cjs.map +1 -0
- package/dist/{rules-BSRYNh4F.mjs → rules-Ay2ZlXtg.mjs} +868 -175
- package/dist/rules-Ay2ZlXtg.mjs.map +1 -0
- package/dist/settings.cjs +1 -0
- package/dist/settings.d.cts +5 -92
- package/dist/settings.d.mts +5 -92
- package/dist/settings.mjs +1 -0
- package/oxlintrc.schema.json +718 -0
- package/package.json +10 -3
- package/dist/rules-BSRYNh4F.mjs.map +0 -1
- package/dist/rules-COk7kmEU.cjs.map +0 -1
|
@@ -0,0 +1,718 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Oxlintrc with @cerios/sparta-lint-rules",
|
|
4
|
+
"description": "oxlint's configuration schema, extended with the sparta rules and settings.sparta. Generated by tests/oxlintrc-schema.test.ts; do not edit.",
|
|
5
|
+
"allOf": [
|
|
6
|
+
{
|
|
7
|
+
"$ref": "../../oxlint/configuration_schema.json"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"properties": {
|
|
11
|
+
"rules": {
|
|
12
|
+
"properties": {
|
|
13
|
+
"sparta/architecture-boundaries": {
|
|
14
|
+
"description": "Enforce the SPARTA layer and isolation boundaries between imports.",
|
|
15
|
+
"markdownDescription": "Enforce the SPARTA layer and isolation boundaries between imports.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/architecture-boundaries.md)",
|
|
16
|
+
"anyOf": [
|
|
17
|
+
{
|
|
18
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": [
|
|
23
|
+
{
|
|
24
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"minItems": 1,
|
|
28
|
+
"maxItems": 1
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"sparta/class-matches-filename": {
|
|
33
|
+
"description": "Require a layer file to contain exactly one class, named after the file in PascalCase.",
|
|
34
|
+
"markdownDescription": "Require a layer file to contain exactly one class, named after the file in PascalCase.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/class-matches-filename.md)",
|
|
35
|
+
"anyOf": [
|
|
36
|
+
{
|
|
37
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": [
|
|
42
|
+
{
|
|
43
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"minItems": 1,
|
|
47
|
+
"maxItems": 1
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"sparta/director-composes-builders": {
|
|
52
|
+
"description": "Require a director to compose several builders; a director using a single builder belongs on that builder.",
|
|
53
|
+
"markdownDescription": "Require a director to compose several builders; a director using a single builder belongs on that builder.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/director-composes-builders.md)",
|
|
54
|
+
"anyOf": [
|
|
55
|
+
{
|
|
56
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": [
|
|
61
|
+
{
|
|
62
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"minItems": 1,
|
|
66
|
+
"maxItems": 1
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"sparta/expect-from-support": {
|
|
71
|
+
"description": "Require `expect` to be imported from the support module (`@sparta/support`) inside sparta/.",
|
|
72
|
+
"markdownDescription": "Require `expect` to be imported from the support module (`@sparta/support`) inside sparta/.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/expect-from-support.md)",
|
|
73
|
+
"anyOf": [
|
|
74
|
+
{
|
|
75
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": [
|
|
80
|
+
{
|
|
81
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"minItems": 1,
|
|
85
|
+
"maxItems": 1
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"sparta/file-naming": {
|
|
90
|
+
"description": "Require files in a layer folder to be kebab-case and end with the layer suffix (e.g. `orders-stepper.ts`).",
|
|
91
|
+
"markdownDescription": "Require files in a layer folder to be kebab-case and end with the layer suffix (e.g. `orders-stepper.ts`).\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/file-naming.md)",
|
|
92
|
+
"anyOf": [
|
|
93
|
+
{
|
|
94
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": [
|
|
99
|
+
{
|
|
100
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"minItems": 1,
|
|
104
|
+
"maxItems": 1
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"sparta/lines-between-class-members": {
|
|
109
|
+
"description": "Require a blank line after every multi-line method-like class member, and disallow blank lines between method overloads.",
|
|
110
|
+
"markdownDescription": "Require a blank line after every multi-line method-like class member, and disallow blank lines between method overloads.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/lines-between-class-members.md)",
|
|
111
|
+
"anyOf": [
|
|
112
|
+
{
|
|
113
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "array",
|
|
117
|
+
"items": [
|
|
118
|
+
{
|
|
119
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"minItems": 1,
|
|
123
|
+
"maxItems": 1
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"sparta/member-ordering": {
|
|
128
|
+
"description": "Require class members in a fixed order: properties, constructor, methods; static before instance; public before protected before private.",
|
|
129
|
+
"markdownDescription": "Require class members in a fixed order: properties, constructor, methods; static before instance; public before protected before private.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/member-ordering.md)",
|
|
130
|
+
"anyOf": [
|
|
131
|
+
{
|
|
132
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": [
|
|
137
|
+
{
|
|
138
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"minItems": 1,
|
|
142
|
+
"maxItems": 1
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"sparta/no-direct-construction-in-tests": {
|
|
147
|
+
"description": "Disallow constructing SPARTA layer classes in tests; use the fixtures instead.",
|
|
148
|
+
"markdownDescription": "Disallow constructing SPARTA layer classes in tests; use the fixtures instead.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/no-direct-construction-in-tests.md)",
|
|
149
|
+
"anyOf": [
|
|
150
|
+
{
|
|
151
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "array",
|
|
155
|
+
"items": [
|
|
156
|
+
{
|
|
157
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"minItems": 1,
|
|
161
|
+
"maxItems": 1
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"sparta/no-expect-in-tests": {
|
|
166
|
+
"description": "Disallow `expect` in test files; checks belong in steppers and asserters.",
|
|
167
|
+
"markdownDescription": "Disallow `expect` in test files; checks belong in steppers and asserters.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/no-expect-in-tests.md)",
|
|
168
|
+
"anyOf": [
|
|
169
|
+
{
|
|
170
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"type": "array",
|
|
174
|
+
"items": [
|
|
175
|
+
{
|
|
176
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"minItems": 1,
|
|
180
|
+
"maxItems": 1
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"sparta/no-hard-waits": {
|
|
185
|
+
"description": "Disallow fixed-time waits such as `waitForTimeout` and `setTimeout` sleeps.",
|
|
186
|
+
"markdownDescription": "Disallow fixed-time waits such as `waitForTimeout` and `setTimeout` sleeps.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/no-hard-waits.md)",
|
|
187
|
+
"anyOf": [
|
|
188
|
+
{
|
|
189
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": [
|
|
194
|
+
{
|
|
195
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"minItems": 1,
|
|
199
|
+
"maxItems": 1
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"sparta/no-nested-polling": {
|
|
204
|
+
"description": "Disallow polling (`toPass`, `poll`, ...) inside the callback of another poll, also through calls into other files.",
|
|
205
|
+
"markdownDescription": "Disallow polling (`toPass`, `poll`, ...) inside the callback of another poll, also through calls into other files.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/no-nested-polling.md)",
|
|
206
|
+
"anyOf": [
|
|
207
|
+
{
|
|
208
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"type": "array",
|
|
212
|
+
"items": [
|
|
213
|
+
{
|
|
214
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"minItems": 1,
|
|
218
|
+
"maxItems": 1
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"sparta/padding-lines": {
|
|
223
|
+
"description": "Require blank lines after imports, around top-level functions and around object methods, and disallow blank lines between function overloads.",
|
|
224
|
+
"markdownDescription": "Require blank lines after imports, around top-level functions and around object methods, and disallow blank lines between function overloads.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/padding-lines.md)",
|
|
225
|
+
"anyOf": [
|
|
226
|
+
{
|
|
227
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"type": "array",
|
|
231
|
+
"items": [
|
|
232
|
+
{
|
|
233
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"minItems": 1,
|
|
237
|
+
"maxItems": 1
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"sparta/step-placeholders": {
|
|
242
|
+
"description": "Validate the placeholders in `@step` descriptions against the method parameters.",
|
|
243
|
+
"markdownDescription": "Validate the placeholders in `@step` descriptions against the method parameters.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/step-placeholders.md)",
|
|
244
|
+
"anyOf": [
|
|
245
|
+
{
|
|
246
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"type": "array",
|
|
250
|
+
"items": [
|
|
251
|
+
{
|
|
252
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"minItems": 1,
|
|
256
|
+
"maxItems": 1
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"sparta/step-required": {
|
|
261
|
+
"description": "Require a `@step` decorator on public methods of steppers, asserters and scenarios.",
|
|
262
|
+
"markdownDescription": "Require a `@step` decorator on public methods of steppers, asserters and scenarios.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/step-required.md)",
|
|
263
|
+
"anyOf": [
|
|
264
|
+
{
|
|
265
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"type": "array",
|
|
269
|
+
"items": [
|
|
270
|
+
{
|
|
271
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"minItems": 1,
|
|
275
|
+
"maxItems": 1
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"overrides": {
|
|
282
|
+
"items": {
|
|
283
|
+
"properties": {
|
|
284
|
+
"rules": {
|
|
285
|
+
"properties": {
|
|
286
|
+
"sparta/architecture-boundaries": {
|
|
287
|
+
"description": "Enforce the SPARTA layer and isolation boundaries between imports.",
|
|
288
|
+
"markdownDescription": "Enforce the SPARTA layer and isolation boundaries between imports.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/architecture-boundaries.md)",
|
|
289
|
+
"anyOf": [
|
|
290
|
+
{
|
|
291
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"type": "array",
|
|
295
|
+
"items": [
|
|
296
|
+
{
|
|
297
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"minItems": 1,
|
|
301
|
+
"maxItems": 1
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"sparta/class-matches-filename": {
|
|
306
|
+
"description": "Require a layer file to contain exactly one class, named after the file in PascalCase.",
|
|
307
|
+
"markdownDescription": "Require a layer file to contain exactly one class, named after the file in PascalCase.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/class-matches-filename.md)",
|
|
308
|
+
"anyOf": [
|
|
309
|
+
{
|
|
310
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"type": "array",
|
|
314
|
+
"items": [
|
|
315
|
+
{
|
|
316
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"minItems": 1,
|
|
320
|
+
"maxItems": 1
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"sparta/director-composes-builders": {
|
|
325
|
+
"description": "Require a director to compose several builders; a director using a single builder belongs on that builder.",
|
|
326
|
+
"markdownDescription": "Require a director to compose several builders; a director using a single builder belongs on that builder.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/director-composes-builders.md)",
|
|
327
|
+
"anyOf": [
|
|
328
|
+
{
|
|
329
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"type": "array",
|
|
333
|
+
"items": [
|
|
334
|
+
{
|
|
335
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
"minItems": 1,
|
|
339
|
+
"maxItems": 1
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
"sparta/expect-from-support": {
|
|
344
|
+
"description": "Require `expect` to be imported from the support module (`@sparta/support`) inside sparta/.",
|
|
345
|
+
"markdownDescription": "Require `expect` to be imported from the support module (`@sparta/support`) inside sparta/.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/expect-from-support.md)",
|
|
346
|
+
"anyOf": [
|
|
347
|
+
{
|
|
348
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"type": "array",
|
|
352
|
+
"items": [
|
|
353
|
+
{
|
|
354
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"minItems": 1,
|
|
358
|
+
"maxItems": 1
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
"sparta/file-naming": {
|
|
363
|
+
"description": "Require files in a layer folder to be kebab-case and end with the layer suffix (e.g. `orders-stepper.ts`).",
|
|
364
|
+
"markdownDescription": "Require files in a layer folder to be kebab-case and end with the layer suffix (e.g. `orders-stepper.ts`).\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/file-naming.md)",
|
|
365
|
+
"anyOf": [
|
|
366
|
+
{
|
|
367
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"type": "array",
|
|
371
|
+
"items": [
|
|
372
|
+
{
|
|
373
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"minItems": 1,
|
|
377
|
+
"maxItems": 1
|
|
378
|
+
}
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
"sparta/lines-between-class-members": {
|
|
382
|
+
"description": "Require a blank line after every multi-line method-like class member, and disallow blank lines between method overloads.",
|
|
383
|
+
"markdownDescription": "Require a blank line after every multi-line method-like class member, and disallow blank lines between method overloads.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/lines-between-class-members.md)",
|
|
384
|
+
"anyOf": [
|
|
385
|
+
{
|
|
386
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"type": "array",
|
|
390
|
+
"items": [
|
|
391
|
+
{
|
|
392
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"minItems": 1,
|
|
396
|
+
"maxItems": 1
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"sparta/member-ordering": {
|
|
401
|
+
"description": "Require class members in a fixed order: properties, constructor, methods; static before instance; public before protected before private.",
|
|
402
|
+
"markdownDescription": "Require class members in a fixed order: properties, constructor, methods; static before instance; public before protected before private.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/member-ordering.md)",
|
|
403
|
+
"anyOf": [
|
|
404
|
+
{
|
|
405
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"type": "array",
|
|
409
|
+
"items": [
|
|
410
|
+
{
|
|
411
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
"minItems": 1,
|
|
415
|
+
"maxItems": 1
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
},
|
|
419
|
+
"sparta/no-direct-construction-in-tests": {
|
|
420
|
+
"description": "Disallow constructing SPARTA layer classes in tests; use the fixtures instead.",
|
|
421
|
+
"markdownDescription": "Disallow constructing SPARTA layer classes in tests; use the fixtures instead.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/no-direct-construction-in-tests.md)",
|
|
422
|
+
"anyOf": [
|
|
423
|
+
{
|
|
424
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"type": "array",
|
|
428
|
+
"items": [
|
|
429
|
+
{
|
|
430
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"minItems": 1,
|
|
434
|
+
"maxItems": 1
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
"sparta/no-expect-in-tests": {
|
|
439
|
+
"description": "Disallow `expect` in test files; checks belong in steppers and asserters.",
|
|
440
|
+
"markdownDescription": "Disallow `expect` in test files; checks belong in steppers and asserters.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/no-expect-in-tests.md)",
|
|
441
|
+
"anyOf": [
|
|
442
|
+
{
|
|
443
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"type": "array",
|
|
447
|
+
"items": [
|
|
448
|
+
{
|
|
449
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
450
|
+
}
|
|
451
|
+
],
|
|
452
|
+
"minItems": 1,
|
|
453
|
+
"maxItems": 1
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
|
+
"sparta/no-hard-waits": {
|
|
458
|
+
"description": "Disallow fixed-time waits such as `waitForTimeout` and `setTimeout` sleeps.",
|
|
459
|
+
"markdownDescription": "Disallow fixed-time waits such as `waitForTimeout` and `setTimeout` sleeps.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/no-hard-waits.md)",
|
|
460
|
+
"anyOf": [
|
|
461
|
+
{
|
|
462
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"type": "array",
|
|
466
|
+
"items": [
|
|
467
|
+
{
|
|
468
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
"minItems": 1,
|
|
472
|
+
"maxItems": 1
|
|
473
|
+
}
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
"sparta/no-nested-polling": {
|
|
477
|
+
"description": "Disallow polling (`toPass`, `poll`, ...) inside the callback of another poll, also through calls into other files.",
|
|
478
|
+
"markdownDescription": "Disallow polling (`toPass`, `poll`, ...) inside the callback of another poll, also through calls into other files.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/no-nested-polling.md)",
|
|
479
|
+
"anyOf": [
|
|
480
|
+
{
|
|
481
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"type": "array",
|
|
485
|
+
"items": [
|
|
486
|
+
{
|
|
487
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
"minItems": 1,
|
|
491
|
+
"maxItems": 1
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
"sparta/padding-lines": {
|
|
496
|
+
"description": "Require blank lines after imports, around top-level functions and around object methods, and disallow blank lines between function overloads.",
|
|
497
|
+
"markdownDescription": "Require blank lines after imports, around top-level functions and around object methods, and disallow blank lines between function overloads.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/padding-lines.md)",
|
|
498
|
+
"anyOf": [
|
|
499
|
+
{
|
|
500
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"type": "array",
|
|
504
|
+
"items": [
|
|
505
|
+
{
|
|
506
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
507
|
+
}
|
|
508
|
+
],
|
|
509
|
+
"minItems": 1,
|
|
510
|
+
"maxItems": 1
|
|
511
|
+
}
|
|
512
|
+
]
|
|
513
|
+
},
|
|
514
|
+
"sparta/step-placeholders": {
|
|
515
|
+
"description": "Validate the placeholders in `@step` descriptions against the method parameters.",
|
|
516
|
+
"markdownDescription": "Validate the placeholders in `@step` descriptions against the method parameters.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/step-placeholders.md)",
|
|
517
|
+
"anyOf": [
|
|
518
|
+
{
|
|
519
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"type": "array",
|
|
523
|
+
"items": [
|
|
524
|
+
{
|
|
525
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
"minItems": 1,
|
|
529
|
+
"maxItems": 1
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
},
|
|
533
|
+
"sparta/step-required": {
|
|
534
|
+
"description": "Require a `@step` decorator on public methods of steppers, asserters and scenarios.",
|
|
535
|
+
"markdownDescription": "Require a `@step` decorator on public methods of steppers, asserters and scenarios.\n\n[Documentation](https://github.com/CeriosTesting/sparta-lint-rules/blob/main/docs/rules/step-required.md)",
|
|
536
|
+
"anyOf": [
|
|
537
|
+
{
|
|
538
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"type": "array",
|
|
542
|
+
"items": [
|
|
543
|
+
{
|
|
544
|
+
"$ref": "#/definitions/spartaSeverity"
|
|
545
|
+
}
|
|
546
|
+
],
|
|
547
|
+
"minItems": 1,
|
|
548
|
+
"maxItems": 1
|
|
549
|
+
}
|
|
550
|
+
]
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"settings": {
|
|
558
|
+
"properties": {
|
|
559
|
+
"sparta": {
|
|
560
|
+
"description": "Describes a SPARTA project whose names differ from the standard ones. Settings never relax the rules. See https://github.com/CeriosTesting/sparta-lint-rules#configuration",
|
|
561
|
+
"markdownDescription": "Describes a SPARTA project whose names differ from the standard ones. Settings never relax the rules. See https://github.com/CeriosTesting/sparta-lint-rules#configuration",
|
|
562
|
+
"type": "object",
|
|
563
|
+
"properties": {
|
|
564
|
+
"root": {
|
|
565
|
+
"description": "Project root: aliases resolve against it, and only paths below it are matched. A relative path resolves against the folder the linter runs in. Default: the nearest folder with a package.json.",
|
|
566
|
+
"markdownDescription": "Project root: aliases resolve against it, and only paths below it are matched. A relative path resolves against the folder the linter runs in. Default: the nearest folder with a `package.json`.",
|
|
567
|
+
"type": "string",
|
|
568
|
+
"minLength": 1
|
|
569
|
+
},
|
|
570
|
+
"folders": {
|
|
571
|
+
"description": "Names of the two top-level folders. Replaces the defaults sparta and tests.",
|
|
572
|
+
"markdownDescription": "Names of the two top-level folders. Replaces the defaults `sparta` and `tests`.",
|
|
573
|
+
"type": "object",
|
|
574
|
+
"properties": {
|
|
575
|
+
"sparta": {
|
|
576
|
+
"type": "string",
|
|
577
|
+
"minLength": 1
|
|
578
|
+
},
|
|
579
|
+
"tests": {
|
|
580
|
+
"type": "string",
|
|
581
|
+
"minLength": 1
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"additionalProperties": false
|
|
585
|
+
},
|
|
586
|
+
"areas": {
|
|
587
|
+
"description": "Extra area folders, each following a standard area, e.g. { \"web\": \"ui\" }. Each area folder is still isolated from the others.",
|
|
588
|
+
"markdownDescription": "Extra area folders, each following a standard area, e.g. `{ \"web\": \"ui\" }`. Each area folder is still isolated from the others.",
|
|
589
|
+
"type": "object",
|
|
590
|
+
"additionalProperties": {
|
|
591
|
+
"type": "string",
|
|
592
|
+
"enum": [
|
|
593
|
+
"api",
|
|
594
|
+
"database",
|
|
595
|
+
"desktop",
|
|
596
|
+
"mobile",
|
|
597
|
+
"ui"
|
|
598
|
+
]
|
|
599
|
+
},
|
|
600
|
+
"defaultSnippets": [
|
|
601
|
+
{
|
|
602
|
+
"body": {
|
|
603
|
+
"web": "ui"
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
]
|
|
607
|
+
},
|
|
608
|
+
"layers": {
|
|
609
|
+
"description": "Extra layer folders, each following a standard layer folder (its layer rules and file suffix), e.g. { \"page-objects\": \"pages\" }.",
|
|
610
|
+
"markdownDescription": "Extra layer folders, each following a standard layer folder (its layer rules and file suffix), e.g. `{ \"page-objects\": \"pages\" }`.",
|
|
611
|
+
"type": "object",
|
|
612
|
+
"additionalProperties": {
|
|
613
|
+
"type": "string",
|
|
614
|
+
"enum": [
|
|
615
|
+
"asserters",
|
|
616
|
+
"builders",
|
|
617
|
+
"clients",
|
|
618
|
+
"components",
|
|
619
|
+
"containers",
|
|
620
|
+
"databases",
|
|
621
|
+
"directors",
|
|
622
|
+
"factories",
|
|
623
|
+
"pages",
|
|
624
|
+
"repositories",
|
|
625
|
+
"scenarios",
|
|
626
|
+
"screens",
|
|
627
|
+
"services",
|
|
628
|
+
"steppers",
|
|
629
|
+
"windows"
|
|
630
|
+
]
|
|
631
|
+
},
|
|
632
|
+
"defaultSnippets": [
|
|
633
|
+
{
|
|
634
|
+
"body": {
|
|
635
|
+
"page-objects": "pages"
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
]
|
|
639
|
+
},
|
|
640
|
+
"aliases": {
|
|
641
|
+
"description": "Extra path aliases pointing to the sparta or tests folder, e.g. { \"@app/*\": \"sparta\" }. Only needed when they are not in your tsconfig paths.",
|
|
642
|
+
"markdownDescription": "Extra path aliases pointing to the `sparta` or `tests` folder, e.g. `{ \"@app/*\": \"sparta\" }`. Only needed when they are not in your tsconfig `paths`.",
|
|
643
|
+
"type": "object",
|
|
644
|
+
"additionalProperties": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"enum": [
|
|
647
|
+
"sparta",
|
|
648
|
+
"tests"
|
|
649
|
+
]
|
|
650
|
+
},
|
|
651
|
+
"defaultSnippets": [
|
|
652
|
+
{
|
|
653
|
+
"body": {
|
|
654
|
+
"@app/*": "sparta"
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
"supportModule": {
|
|
660
|
+
"description": "The module expect must be imported from inside the sparta folder. Replaces the default @sparta/support.",
|
|
661
|
+
"markdownDescription": "The module `expect` must be imported from inside the sparta folder. Replaces the default `@sparta/support`.",
|
|
662
|
+
"type": "string",
|
|
663
|
+
"minLength": 1
|
|
664
|
+
},
|
|
665
|
+
"pollingMethods": {
|
|
666
|
+
"description": "Extra retrying methods, added to toPass, toPassAndReturn, poll and pollAndReturn.",
|
|
667
|
+
"markdownDescription": "Extra retrying methods, added to `toPass`, `toPassAndReturn`, `poll` and `pollAndReturn`.",
|
|
668
|
+
"type": "array",
|
|
669
|
+
"items": {
|
|
670
|
+
"type": "string",
|
|
671
|
+
"minLength": 1
|
|
672
|
+
},
|
|
673
|
+
"uniqueItems": true
|
|
674
|
+
},
|
|
675
|
+
"stepDecorators": {
|
|
676
|
+
"description": "Extra decorators that count as @step.",
|
|
677
|
+
"markdownDescription": "Extra decorators that count as `@step`.",
|
|
678
|
+
"type": "array",
|
|
679
|
+
"items": {
|
|
680
|
+
"type": "string",
|
|
681
|
+
"minLength": 1
|
|
682
|
+
},
|
|
683
|
+
"uniqueItems": true
|
|
684
|
+
},
|
|
685
|
+
"expectNames": {
|
|
686
|
+
"description": "Extra assertion functions that tests must not call, added to expect and expectly….",
|
|
687
|
+
"markdownDescription": "Extra assertion functions that tests must not call, added to `expect` and `expectly…`.",
|
|
688
|
+
"type": "array",
|
|
689
|
+
"items": {
|
|
690
|
+
"type": "string",
|
|
691
|
+
"minLength": 1
|
|
692
|
+
},
|
|
693
|
+
"uniqueItems": true
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
"additionalProperties": false
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
],
|
|
703
|
+
"definitions": {
|
|
704
|
+
"spartaSeverity": {
|
|
705
|
+
"description": "off/allow: off, warn: warning, error/deny: error. The sparta rules take no options.",
|
|
706
|
+
"enum": [
|
|
707
|
+
"off",
|
|
708
|
+
"warn",
|
|
709
|
+
"error",
|
|
710
|
+
"allow",
|
|
711
|
+
"deny",
|
|
712
|
+
0,
|
|
713
|
+
1,
|
|
714
|
+
2
|
|
715
|
+
]
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|