@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,570 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-plugin-vue-attribute-hyphenation",
4
+ "revision": 1,
5
+ "mode": "steer",
6
+ "description": "Use hyphenated (kebab-case) attribute and prop names, not camelCase, on Vue components and slots in templates.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*.vue"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "shared",
16
+ "define": {
17
+ "language": "vue",
18
+ "utils": {
19
+ "tag-svg-ctx": {
20
+ "inside": {
21
+ "stopBy": "neighbor",
22
+ "any": [
23
+ {
24
+ "kind": "element"
25
+ },
26
+ {
27
+ "kind": "template_element"
28
+ }
29
+ ],
30
+ "inside": {
31
+ "stopBy": "neighbor",
32
+ "any": [
33
+ {
34
+ "kind": "element"
35
+ },
36
+ {
37
+ "kind": "template_element"
38
+ }
39
+ ],
40
+ "has": {
41
+ "stopBy": "neighbor",
42
+ "kind": "start_tag",
43
+ "matches": "svg-children"
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "tag-math-ctx": {
49
+ "inside": {
50
+ "stopBy": "neighbor",
51
+ "any": [
52
+ {
53
+ "kind": "element"
54
+ },
55
+ {
56
+ "kind": "template_element"
57
+ }
58
+ ],
59
+ "inside": {
60
+ "stopBy": "neighbor",
61
+ "any": [
62
+ {
63
+ "kind": "element"
64
+ },
65
+ {
66
+ "kind": "template_element"
67
+ }
68
+ ],
69
+ "has": {
70
+ "stopBy": "neighbor",
71
+ "kind": "start_tag",
72
+ "matches": "math-children"
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "parent-annotation-xml": {
78
+ "inside": {
79
+ "stopBy": "neighbor",
80
+ "any": [
81
+ {
82
+ "kind": "element"
83
+ },
84
+ {
85
+ "kind": "template_element"
86
+ }
87
+ ],
88
+ "inside": {
89
+ "stopBy": "neighbor",
90
+ "any": [
91
+ {
92
+ "kind": "element"
93
+ },
94
+ {
95
+ "kind": "template_element"
96
+ }
97
+ ],
98
+ "has": {
99
+ "stopBy": "neighbor",
100
+ "kind": "start_tag",
101
+ "has": {
102
+ "stopBy": "neighbor",
103
+ "kind": "tag_name",
104
+ "regex": "^annotation-xml$"
105
+ }
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "parent-text-integration": {
111
+ "inside": {
112
+ "stopBy": "neighbor",
113
+ "any": [
114
+ {
115
+ "kind": "element"
116
+ },
117
+ {
118
+ "kind": "template_element"
119
+ }
120
+ ],
121
+ "inside": {
122
+ "stopBy": "neighbor",
123
+ "any": [
124
+ {
125
+ "kind": "element"
126
+ },
127
+ {
128
+ "kind": "template_element"
129
+ }
130
+ ],
131
+ "has": {
132
+ "stopBy": "neighbor",
133
+ "kind": "start_tag",
134
+ "has": {
135
+ "stopBy": "neighbor",
136
+ "kind": "tag_name",
137
+ "regex": "^(?:mi|mo|mn|ms|mtext)$"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "parent-math-ns": {
144
+ "inside": {
145
+ "stopBy": "neighbor",
146
+ "any": [
147
+ {
148
+ "kind": "element"
149
+ },
150
+ {
151
+ "kind": "template_element"
152
+ }
153
+ ],
154
+ "inside": {
155
+ "stopBy": "neighbor",
156
+ "any": [
157
+ {
158
+ "kind": "element"
159
+ },
160
+ {
161
+ "kind": "template_element"
162
+ }
163
+ ],
164
+ "has": {
165
+ "stopBy": "neighbor",
166
+ "kind": "start_tag",
167
+ "matches": "ns-math"
168
+ }
169
+ }
170
+ }
171
+ },
172
+ "svg-children": {
173
+ "all": [
174
+ {
175
+ "matches": "ns-svg"
176
+ },
177
+ {
178
+ "not": {
179
+ "has": {
180
+ "stopBy": "neighbor",
181
+ "kind": "tag_name",
182
+ "regex": "^(?:foreignObject|desc|title)$"
183
+ }
184
+ }
185
+ }
186
+ ]
187
+ },
188
+ "math-children": {
189
+ "all": [
190
+ {
191
+ "matches": "ns-math"
192
+ },
193
+ {
194
+ "not": {
195
+ "has": {
196
+ "stopBy": "neighbor",
197
+ "kind": "tag_name",
198
+ "regex": "^(?:mi|mo|mn|ms|mtext)$"
199
+ }
200
+ }
201
+ },
202
+ {
203
+ "not": {
204
+ "matches": "annotation-html"
205
+ }
206
+ }
207
+ ]
208
+ },
209
+ "annotation-html": {
210
+ "all": [
211
+ {
212
+ "has": {
213
+ "stopBy": "neighbor",
214
+ "kind": "tag_name",
215
+ "regex": "^annotation-xml$"
216
+ }
217
+ },
218
+ {
219
+ "has": {
220
+ "stopBy": "neighbor",
221
+ "kind": "attribute",
222
+ "all": [
223
+ {
224
+ "has": {
225
+ "stopBy": "neighbor",
226
+ "kind": "attribute_name",
227
+ "regex": "(?i)^encoding$"
228
+ }
229
+ },
230
+ {
231
+ "has": {
232
+ "stopBy": "end",
233
+ "kind": "attribute_value",
234
+ "regex": "^(?:text/html|application/xhtml\\+xml)$"
235
+ }
236
+ }
237
+ ]
238
+ }
239
+ }
240
+ ]
241
+ },
242
+ "ns-svg": {
243
+ "any": [
244
+ {
245
+ "matches": "tag-svg-ctx"
246
+ },
247
+ {
248
+ "all": [
249
+ {
250
+ "has": {
251
+ "stopBy": "neighbor",
252
+ "kind": "tag_name",
253
+ "regex": "^svg$"
254
+ }
255
+ },
256
+ {
257
+ "any": [
258
+ {
259
+ "not": {
260
+ "matches": "tag-math-ctx"
261
+ }
262
+ },
263
+ {
264
+ "matches": "parent-annotation-xml"
265
+ }
266
+ ]
267
+ }
268
+ ]
269
+ }
270
+ ]
271
+ },
272
+ "ns-math": {
273
+ "any": [
274
+ {
275
+ "matches": "tag-math-ctx"
276
+ },
277
+ {
278
+ "all": [
279
+ {
280
+ "has": {
281
+ "stopBy": "neighbor",
282
+ "kind": "tag_name",
283
+ "regex": "^math$"
284
+ }
285
+ },
286
+ {
287
+ "not": {
288
+ "matches": "tag-svg-ctx"
289
+ }
290
+ },
291
+ {
292
+ "not": {
293
+ "matches": "tag-math-ctx"
294
+ }
295
+ }
296
+ ]
297
+ },
298
+ {
299
+ "all": [
300
+ {
301
+ "has": {
302
+ "stopBy": "neighbor",
303
+ "kind": "tag_name",
304
+ "regex": "^(?:mglyph|malignmark)$"
305
+ }
306
+ },
307
+ {
308
+ "matches": "parent-text-integration"
309
+ },
310
+ {
311
+ "matches": "parent-math-ns"
312
+ }
313
+ ]
314
+ }
315
+ ]
316
+ },
317
+ "custom-tag": {
318
+ "any": [
319
+ {
320
+ "has": {
321
+ "stopBy": "neighbor",
322
+ "any": [
323
+ {
324
+ "kind": "attribute",
325
+ "has": {
326
+ "stopBy": "neighbor",
327
+ "kind": "attribute_name",
328
+ "regex": "(?i)^is$"
329
+ }
330
+ },
331
+ {
332
+ "kind": "directive_attribute",
333
+ "regex": "(?i)^(?:(?:v-bind:|[:.])is(?:[.=\\s]|$)|v-is(?:[:.=\\s]|$))"
334
+ }
335
+ ]
336
+ }
337
+ },
338
+ {
339
+ "regex": "^<[^\\s/>.]+\\."
340
+ },
341
+ {
342
+ "all": [
343
+ {
344
+ "not": {
345
+ "matches": "ns-svg"
346
+ }
347
+ },
348
+ {
349
+ "not": {
350
+ "matches": "ns-math"
351
+ }
352
+ },
353
+ {
354
+ "has": {
355
+ "stopBy": "neighbor",
356
+ "kind": "tag_name",
357
+ "not": {
358
+ "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)$"
359
+ }
360
+ }
361
+ }
362
+ ]
363
+ },
364
+ {
365
+ "all": [
366
+ {
367
+ "matches": "ns-svg"
368
+ },
369
+ {
370
+ "has": {
371
+ "stopBy": "neighbor",
372
+ "kind": "tag_name",
373
+ "not": {
374
+ "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)$"
375
+ }
376
+ }
377
+ }
378
+ ]
379
+ },
380
+ {
381
+ "all": [
382
+ {
383
+ "matches": "ns-math"
384
+ },
385
+ {
386
+ "not": {
387
+ "matches": "ns-svg"
388
+ }
389
+ },
390
+ {
391
+ "has": {
392
+ "stopBy": "neighbor",
393
+ "kind": "tag_name",
394
+ "not": {
395
+ "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)$"
396
+ }
397
+ }
398
+ }
399
+ ]
400
+ }
401
+ ]
402
+ },
403
+ "checked-tag": {
404
+ "any": [
405
+ {
406
+ "matches": "custom-tag"
407
+ },
408
+ {
409
+ "has": {
410
+ "stopBy": "neighbor",
411
+ "kind": "tag_name",
412
+ "regex": "^slot$"
413
+ }
414
+ }
415
+ ]
416
+ }
417
+ }
418
+ }
419
+ },
420
+ {
421
+ "id": "static",
422
+ "forbid": {
423
+ "ast": {
424
+ "language": "vue",
425
+ "rule": {
426
+ "kind": "attribute",
427
+ "regex": "^(?<KEY>[^=\\s]+)",
428
+ "has": {
429
+ "stopBy": "neighbor",
430
+ "kind": "attribute_name",
431
+ "all": [
432
+ {
433
+ "regex": "[\\p{Lu}\\p{Lt}]"
434
+ },
435
+ {
436
+ "not": {
437
+ "regex": "data-|aria-|slot-scope|accent-height|alignment-baseline|arabic-form|attributeName|attributeType|baseFrequency|baseline-shift|baseProfile|calcMode|cap-height|clipPathUnits|clip-path|clip-rule|color-interpolation|color-interpolation-filters|color-profile|color-rendering|contentScriptType|contentStyleType|diffuseConstant|dominant-baseline|edgeMode|enable-background|externalResourcesRequired|fill-opacity|fill-rule|filterRes|filterUnits|flood-color|flood-opacity|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|glyph-name|glyph-orientation-horizontal|glyph-orientation-vertical|glyphRef|gradientTransform|gradientUnits|horiz-adv-x|horiz-origin-x|image-rendering|kernelMatrix|kernelUnitLength|keyPoints|keySplines|keyTimes|lengthAdjust|letter-spacing|lighting-color|limitingConeAngle|marker-end|marker-mid|marker-start|markerHeight|markerUnits|markerWidth|maskContentUnits|maskUnits|numOctaves|overline-position|overline-thickness|panose-1|paint-order|pathLength|patternContentUnits|patternTransform|patternUnits|pointer-events|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|referrerPolicy|refX|refY|rendering-intent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|shape-rendering|specularConstant|specularExponent|spreadMethod|startOffset|stdDeviation|stitchTiles|stop-color|stop-opacity|strikethrough-position|strikethrough-thickness|stroke-dasharray|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|surfaceScale|systemLanguage|tableValues|targetX|targetY|text-anchor|text-decoration|text-rendering|textLength|transform-origin|underline-position|underline-thickness|unicode-bidi|unicode-range|units-per-em|v-alphabetic|v-hanging|v-ideographic|v-mathematical|vector-effect|vert-adv-y|vert-origin-x|vert-origin-y|viewBox|viewTarget|word-spacing|writing-mode|x-height|xChannelSelector|yChannelSelector|zoomAndPan"
438
+ }
439
+ }
440
+ ]
441
+ },
442
+ "inside": {
443
+ "stopBy": "neighbor",
444
+ "any": [
445
+ {
446
+ "kind": "start_tag",
447
+ "matches": "checked-tag"
448
+ },
449
+ {
450
+ "kind": "self_closing_tag",
451
+ "matches": "checked-tag"
452
+ }
453
+ ],
454
+ "inside": {
455
+ "stopBy": "end",
456
+ "kind": "template_element"
457
+ }
458
+ }
459
+ }
460
+ }
461
+ },
462
+ "violation": {
463
+ "anchor": "witness.span",
464
+ "code": "vue/attribute-hyphenation",
465
+ "message": "Attribute '${KEY}' must be hyphenated.",
466
+ "suppress": {
467
+ "eslint": {
468
+ "rules": [
469
+ "vue/attribute-hyphenation"
470
+ ]
471
+ }
472
+ }
473
+ }
474
+ },
475
+ {
476
+ "id": "directive",
477
+ "forbid": {
478
+ "ast": {
479
+ "language": "vue",
480
+ "rule": {
481
+ "kind": "directive_attribute",
482
+ "regex": "^(?<KEY>[^=\\s]+)",
483
+ "all": [
484
+ {
485
+ "any": [
486
+ {
487
+ "has": {
488
+ "stopBy": "neighbor",
489
+ "kind": "directive_name",
490
+ "regex": "^v-(?:bind|model)$"
491
+ }
492
+ },
493
+ {
494
+ "regex": "^[:.]"
495
+ }
496
+ ]
497
+ },
498
+ {
499
+ "not": {
500
+ "all": [
501
+ {
502
+ "regex": "^\\."
503
+ },
504
+ {
505
+ "follows": {
506
+ "stopBy": "neighbor",
507
+ "kind": "tag_name"
508
+ }
509
+ },
510
+ {
511
+ "inside": {
512
+ "stopBy": "neighbor",
513
+ "regex": "^<[^\\s/>.]+\\."
514
+ }
515
+ }
516
+ ]
517
+ }
518
+ },
519
+ {
520
+ "has": {
521
+ "stopBy": "neighbor",
522
+ "kind": "directive_value",
523
+ "all": [
524
+ {
525
+ "regex": "[\\p{Lu}\\p{Lt}]"
526
+ },
527
+ {
528
+ "not": {
529
+ "regex": "data-|aria-|slot-scope|accent-height|alignment-baseline|arabic-form|attributeName|attributeType|baseFrequency|baseline-shift|baseProfile|calcMode|cap-height|clipPathUnits|clip-path|clip-rule|color-interpolation|color-interpolation-filters|color-profile|color-rendering|contentScriptType|contentStyleType|diffuseConstant|dominant-baseline|edgeMode|enable-background|externalResourcesRequired|fill-opacity|fill-rule|filterRes|filterUnits|flood-color|flood-opacity|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|glyph-name|glyph-orientation-horizontal|glyph-orientation-vertical|glyphRef|gradientTransform|gradientUnits|horiz-adv-x|horiz-origin-x|image-rendering|kernelMatrix|kernelUnitLength|keyPoints|keySplines|keyTimes|lengthAdjust|letter-spacing|lighting-color|limitingConeAngle|marker-end|marker-mid|marker-start|markerHeight|markerUnits|markerWidth|maskContentUnits|maskUnits|numOctaves|overline-position|overline-thickness|panose-1|paint-order|pathLength|patternContentUnits|patternTransform|patternUnits|pointer-events|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|referrerPolicy|refX|refY|rendering-intent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|shape-rendering|specularConstant|specularExponent|spreadMethod|startOffset|stdDeviation|stitchTiles|stop-color|stop-opacity|strikethrough-position|strikethrough-thickness|stroke-dasharray|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|surfaceScale|systemLanguage|tableValues|targetX|targetY|text-anchor|text-decoration|text-rendering|textLength|transform-origin|underline-position|underline-thickness|unicode-bidi|unicode-range|units-per-em|v-alphabetic|v-hanging|v-ideographic|v-mathematical|vector-effect|vert-adv-y|vert-origin-x|vert-origin-y|viewBox|viewTarget|word-spacing|writing-mode|x-height|xChannelSelector|yChannelSelector|zoomAndPan"
530
+ }
531
+ }
532
+ ]
533
+ }
534
+ }
535
+ ],
536
+ "inside": {
537
+ "stopBy": "neighbor",
538
+ "any": [
539
+ {
540
+ "kind": "start_tag",
541
+ "matches": "checked-tag"
542
+ },
543
+ {
544
+ "kind": "self_closing_tag",
545
+ "matches": "checked-tag"
546
+ }
547
+ ],
548
+ "inside": {
549
+ "stopBy": "end",
550
+ "kind": "template_element"
551
+ }
552
+ }
553
+ }
554
+ }
555
+ },
556
+ "violation": {
557
+ "anchor": "witness.span",
558
+ "code": "vue/attribute-hyphenation",
559
+ "message": "Attribute '${KEY}' must be hyphenated.",
560
+ "suppress": {
561
+ "eslint": {
562
+ "rules": [
563
+ "vue/attribute-hyphenation"
564
+ ]
565
+ }
566
+ }
567
+ }
568
+ }
569
+ ]
570
+ }