@neralabs/rerail-pack-vue 0.1.3 → 0.1.5

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.
@@ -0,0 +1,568 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-plugin-vue-require-v-for-key",
4
+ "revision": 1,
5
+ "mode": "steer",
6
+ "description": "Add a :key binding to elements (not components) that v-for renders in Vue templates, so Vue can track and reuse each item.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*.vue"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "upstream",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "vue",
19
+ "utils": {
20
+ "tag-node": {
21
+ "any": [
22
+ {
23
+ "kind": "start_tag"
24
+ },
25
+ {
26
+ "kind": "self_closing_tag"
27
+ }
28
+ ]
29
+ },
30
+ "el": {
31
+ "any": [
32
+ {
33
+ "kind": "element"
34
+ },
35
+ {
36
+ "kind": "template_element"
37
+ }
38
+ ]
39
+ },
40
+ "vfor": {
41
+ "kind": "directive_attribute",
42
+ "regex": "^v-for(?:[.:=\\s]|$)"
43
+ },
44
+ "vkey": {
45
+ "kind": "directive_attribute",
46
+ "regex": "^(?:v-bind:|[:.])key(?:[.=\\s]|$)"
47
+ },
48
+ "ts-keyless": {
49
+ "all": [
50
+ {
51
+ "matches": "el"
52
+ },
53
+ {
54
+ "has": {
55
+ "stopBy": "neighbor",
56
+ "matches": "tag-node",
57
+ "has": {
58
+ "stopBy": "neighbor",
59
+ "kind": "tag_name",
60
+ "regex": "^(?i:template|slot)$"
61
+ }
62
+ }
63
+ },
64
+ {
65
+ "not": {
66
+ "has": {
67
+ "stopBy": "neighbor",
68
+ "matches": "tag-node",
69
+ "has": {
70
+ "stopBy": "neighbor",
71
+ "matches": "vkey"
72
+ }
73
+ }
74
+ }
75
+ }
76
+ ]
77
+ },
78
+ "governed": {
79
+ "any": [
80
+ {
81
+ "all": [
82
+ {
83
+ "inside": {
84
+ "stopBy": "neighbor",
85
+ "matches": "el"
86
+ }
87
+ },
88
+ {
89
+ "has": {
90
+ "stopBy": "neighbor",
91
+ "matches": "tag-node",
92
+ "has": {
93
+ "stopBy": "neighbor",
94
+ "matches": "vfor",
95
+ "pattern": "$G"
96
+ }
97
+ }
98
+ }
99
+ ]
100
+ },
101
+ {
102
+ "inside": {
103
+ "stopBy": "neighbor",
104
+ "all": [
105
+ {
106
+ "matches": "ts-keyless"
107
+ },
108
+ {
109
+ "matches": "governed"
110
+ }
111
+ ]
112
+ }
113
+ }
114
+ ]
115
+ },
116
+ "tag-svg-ctx": {
117
+ "matches": "tag-node",
118
+ "inside": {
119
+ "stopBy": "neighbor",
120
+ "any": [
121
+ {
122
+ "kind": "element"
123
+ },
124
+ {
125
+ "kind": "template_element"
126
+ }
127
+ ],
128
+ "inside": {
129
+ "stopBy": "neighbor",
130
+ "any": [
131
+ {
132
+ "kind": "element"
133
+ },
134
+ {
135
+ "kind": "template_element"
136
+ }
137
+ ],
138
+ "has": {
139
+ "stopBy": "neighbor",
140
+ "kind": "start_tag",
141
+ "matches": "svg-children"
142
+ }
143
+ }
144
+ }
145
+ },
146
+ "tag-math-ctx": {
147
+ "matches": "tag-node",
148
+ "inside": {
149
+ "stopBy": "neighbor",
150
+ "any": [
151
+ {
152
+ "kind": "element"
153
+ },
154
+ {
155
+ "kind": "template_element"
156
+ }
157
+ ],
158
+ "inside": {
159
+ "stopBy": "neighbor",
160
+ "any": [
161
+ {
162
+ "kind": "element"
163
+ },
164
+ {
165
+ "kind": "template_element"
166
+ }
167
+ ],
168
+ "has": {
169
+ "stopBy": "neighbor",
170
+ "kind": "start_tag",
171
+ "matches": "math-children"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "parent-annotation-xml": {
177
+ "matches": "tag-node",
178
+ "inside": {
179
+ "stopBy": "neighbor",
180
+ "any": [
181
+ {
182
+ "kind": "element"
183
+ },
184
+ {
185
+ "kind": "template_element"
186
+ }
187
+ ],
188
+ "inside": {
189
+ "stopBy": "neighbor",
190
+ "any": [
191
+ {
192
+ "kind": "element"
193
+ },
194
+ {
195
+ "kind": "template_element"
196
+ }
197
+ ],
198
+ "has": {
199
+ "stopBy": "neighbor",
200
+ "kind": "start_tag",
201
+ "has": {
202
+ "stopBy": "neighbor",
203
+ "kind": "tag_name",
204
+ "regex": "^annotation-xml$"
205
+ }
206
+ }
207
+ }
208
+ }
209
+ },
210
+ "parent-text-integration": {
211
+ "matches": "tag-node",
212
+ "inside": {
213
+ "stopBy": "neighbor",
214
+ "any": [
215
+ {
216
+ "kind": "element"
217
+ },
218
+ {
219
+ "kind": "template_element"
220
+ }
221
+ ],
222
+ "inside": {
223
+ "stopBy": "neighbor",
224
+ "any": [
225
+ {
226
+ "kind": "element"
227
+ },
228
+ {
229
+ "kind": "template_element"
230
+ }
231
+ ],
232
+ "has": {
233
+ "stopBy": "neighbor",
234
+ "kind": "start_tag",
235
+ "has": {
236
+ "stopBy": "neighbor",
237
+ "kind": "tag_name",
238
+ "regex": "^(?:mi|mo|mn|ms|mtext)$"
239
+ }
240
+ }
241
+ }
242
+ }
243
+ },
244
+ "parent-math-ns": {
245
+ "matches": "tag-node",
246
+ "inside": {
247
+ "stopBy": "neighbor",
248
+ "any": [
249
+ {
250
+ "kind": "element"
251
+ },
252
+ {
253
+ "kind": "template_element"
254
+ }
255
+ ],
256
+ "inside": {
257
+ "stopBy": "neighbor",
258
+ "any": [
259
+ {
260
+ "kind": "element"
261
+ },
262
+ {
263
+ "kind": "template_element"
264
+ }
265
+ ],
266
+ "has": {
267
+ "stopBy": "neighbor",
268
+ "kind": "start_tag",
269
+ "matches": "ns-math"
270
+ }
271
+ }
272
+ }
273
+ },
274
+ "svg-children": {
275
+ "all": [
276
+ {
277
+ "matches": "ns-svg"
278
+ },
279
+ {
280
+ "not": {
281
+ "has": {
282
+ "stopBy": "neighbor",
283
+ "kind": "tag_name",
284
+ "regex": "^(?:foreignObject|desc|title)$"
285
+ }
286
+ }
287
+ }
288
+ ]
289
+ },
290
+ "math-children": {
291
+ "all": [
292
+ {
293
+ "matches": "ns-math"
294
+ },
295
+ {
296
+ "not": {
297
+ "has": {
298
+ "stopBy": "neighbor",
299
+ "kind": "tag_name",
300
+ "regex": "^(?:mi|mo|mn|ms|mtext)$"
301
+ }
302
+ }
303
+ },
304
+ {
305
+ "not": {
306
+ "matches": "annotation-html"
307
+ }
308
+ }
309
+ ]
310
+ },
311
+ "annotation-html": {
312
+ "all": [
313
+ {
314
+ "has": {
315
+ "stopBy": "neighbor",
316
+ "kind": "tag_name",
317
+ "regex": "^annotation-xml$"
318
+ }
319
+ },
320
+ {
321
+ "has": {
322
+ "stopBy": "neighbor",
323
+ "kind": "attribute",
324
+ "all": [
325
+ {
326
+ "has": {
327
+ "stopBy": "neighbor",
328
+ "kind": "attribute_name",
329
+ "regex": "(?i)^encoding$"
330
+ }
331
+ },
332
+ {
333
+ "has": {
334
+ "stopBy": "end",
335
+ "kind": "attribute_value",
336
+ "regex": "^(?:text/html|application/xhtml\\+xml)$"
337
+ }
338
+ }
339
+ ]
340
+ }
341
+ }
342
+ ]
343
+ },
344
+ "ns-svg": {
345
+ "any": [
346
+ {
347
+ "matches": "tag-svg-ctx"
348
+ },
349
+ {
350
+ "all": [
351
+ {
352
+ "has": {
353
+ "stopBy": "neighbor",
354
+ "kind": "tag_name",
355
+ "regex": "^svg$"
356
+ }
357
+ },
358
+ {
359
+ "any": [
360
+ {
361
+ "not": {
362
+ "matches": "tag-math-ctx"
363
+ }
364
+ },
365
+ {
366
+ "matches": "parent-annotation-xml"
367
+ }
368
+ ]
369
+ }
370
+ ]
371
+ }
372
+ ]
373
+ },
374
+ "ns-math": {
375
+ "any": [
376
+ {
377
+ "matches": "tag-math-ctx"
378
+ },
379
+ {
380
+ "all": [
381
+ {
382
+ "has": {
383
+ "stopBy": "neighbor",
384
+ "kind": "tag_name",
385
+ "regex": "^math$"
386
+ }
387
+ },
388
+ {
389
+ "not": {
390
+ "matches": "tag-svg-ctx"
391
+ }
392
+ },
393
+ {
394
+ "not": {
395
+ "matches": "tag-math-ctx"
396
+ }
397
+ }
398
+ ]
399
+ },
400
+ {
401
+ "all": [
402
+ {
403
+ "has": {
404
+ "stopBy": "neighbor",
405
+ "kind": "tag_name",
406
+ "regex": "^(?:mglyph|malignmark)$"
407
+ }
408
+ },
409
+ {
410
+ "matches": "parent-text-integration"
411
+ },
412
+ {
413
+ "matches": "parent-math-ns"
414
+ }
415
+ ]
416
+ }
417
+ ]
418
+ },
419
+ "custom-tag": {
420
+ "any": [
421
+ {
422
+ "has": {
423
+ "stopBy": "neighbor",
424
+ "any": [
425
+ {
426
+ "kind": "attribute",
427
+ "has": {
428
+ "stopBy": "neighbor",
429
+ "kind": "attribute_name",
430
+ "regex": "(?i)^is$"
431
+ }
432
+ },
433
+ {
434
+ "kind": "directive_attribute",
435
+ "regex": "(?i)^(?:(?:v-bind:|[:.])is(?:[.=\\s]|$)|v-is(?:[:.=\\s]|$))"
436
+ }
437
+ ]
438
+ }
439
+ },
440
+ {
441
+ "all": [
442
+ {
443
+ "not": {
444
+ "matches": "ns-svg"
445
+ }
446
+ },
447
+ {
448
+ "not": {
449
+ "matches": "ns-math"
450
+ }
451
+ },
452
+ {
453
+ "has": {
454
+ "stopBy": "neighbor",
455
+ "kind": "tag_name",
456
+ "not": {
457
+ "regex": "^(?:a|abbr|address|area|article|aside|audio|b|base|bdi|bdo|blockquote|body|br|button|camera|canvas|caption|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|geolocation|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|install|kbd|label|legend|li|link|main|map|mark|menu|meta|meter|microphone|model|nav|noscript|object|ol|optgroup|option|output|p|picture|pre|progress|q|rp|rt|ruby|s|samp|script|search|section|select|selectedcontent|slot|small|source|span|strong|style|sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|u|ul|usermedia|var|video|wbr)$"
458
+ }
459
+ }
460
+ }
461
+ ]
462
+ },
463
+ {
464
+ "all": [
465
+ {
466
+ "matches": "ns-svg"
467
+ },
468
+ {
469
+ "has": {
470
+ "stopBy": "neighbor",
471
+ "kind": "tag_name",
472
+ "not": {
473
+ "regex": "^(?:a|animate|animateMotion|animateTransform|circle|clipPath|defs|desc|ellipse|feBlend|feColorMatrix|feComponentTransfer|feComposite|feConvolveMatrix|feDiffuseLighting|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|feMergeNode|feMorphology|feOffset|fePointLight|feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|foreignObject|g|image|line|linearGradient|marker|mask|metadata|mpath|path|pattern|polygon|polyline|radialGradient|rect|script|set|stop|style|svg|switch|symbol|text|textPath|title|tspan|use|view)$"
474
+ }
475
+ }
476
+ }
477
+ ]
478
+ },
479
+ {
480
+ "all": [
481
+ {
482
+ "matches": "ns-math"
483
+ },
484
+ {
485
+ "not": {
486
+ "matches": "ns-svg"
487
+ }
488
+ },
489
+ {
490
+ "has": {
491
+ "stopBy": "neighbor",
492
+ "kind": "tag_name",
493
+ "not": {
494
+ "regex": "^(?:math|maction|annotation|annotation-xml|menclose|merror|mfenced|mfrac|mi|mmultiscripts|mn|mo|mover|mpadded|mphantom|mprescripts|mroot|mrow|ms|semantics|mspace|msqrt|mstyle|msub|msup|msubsup|mtable|mtd|mtext|mtr|munder|munderover)$"
495
+ }
496
+ }
497
+ }
498
+ ]
499
+ }
500
+ ]
501
+ }
502
+ },
503
+ "rule": {
504
+ "all": [
505
+ {
506
+ "matches": "tag-node"
507
+ },
508
+ {
509
+ "not": {
510
+ "has": {
511
+ "stopBy": "neighbor",
512
+ "matches": "vkey"
513
+ }
514
+ }
515
+ },
516
+ {
517
+ "not": {
518
+ "has": {
519
+ "stopBy": "neighbor",
520
+ "kind": "tag_name",
521
+ "regex": "^(?i:template|slot)$"
522
+ }
523
+ }
524
+ },
525
+ {
526
+ "not": {
527
+ "matches": "custom-tag"
528
+ }
529
+ },
530
+ {
531
+ "inside": {
532
+ "stopBy": "end",
533
+ "kind": "template_element"
534
+ }
535
+ },
536
+ {
537
+ "inside": {
538
+ "stopBy": "neighbor",
539
+ "all": [
540
+ {
541
+ "matches": "el"
542
+ },
543
+ {
544
+ "matches": "governed"
545
+ }
546
+ ]
547
+ }
548
+ }
549
+ ]
550
+ }
551
+ }
552
+ },
553
+ "violation": {
554
+ "anchor": "witness.span",
555
+ "code": "vue/require-v-for-key",
556
+ "message": "Elements in iteration expect to have 'v-bind:key' directives.",
557
+ "suppress": {
558
+ "eslint": {
559
+ "rules": [
560
+ "vue/require-v-for-key"
561
+ ]
562
+ }
563
+ },
564
+ "each": "G"
565
+ }
566
+ }
567
+ ]
568
+ }