tjw-lint / vue3-snapshot-serializer

Vitest/Jest Snapshot Serializer for Vue 3 components
https://TheJaredWilcurt.com/vue-snapshot-serializer
MIT License
3 stars 2 forks source link

Diffable Formatter Setting: Attributes per line #10

Closed TheJaredWilcurt closed 2 weeks ago

TheJaredWilcurt commented 1 month ago

Attributes per line

Defaults to 1. Determines how many attributes are allowed on the same line as the starting tag. Accepts any whole number starting from 0.

<!-- global.vueSnapshots.formatting.attributesPerLine = 0; -->
<span></span>
<span
  class="cow dog"
></span>
<span
  class="cow dog"
  id="animals"
></span>
<span
  class="cow dog"
  id="animals"
  title="Moo"
></span>
<!-- global.vueSnapshots.formatting.attributesPerLine = 1; -->
<span></span>
<span class="cow dog"></span>
<span
  class="cow dog"
  id="animals"
></span>
<span
  class="cow dog"
  id="animals"
  title="Moo"
></span>
<!-- global.vueSnapshots.formatting.attributesPerLine = 2; -->
<span></span>
<span class="cow dog"></span>
<span class="cow dog" id="animals"></span>
<span
  class="cow dog"
  id="animals"
  title="Moo"
></span>
<!-- global.vueSnapshots.formatting.attributesPerLine = 3; -->
<span></span>
<span class="cow dog"></span>
<span class="cow dog" id="animals"></span>
<span class="cow dog" id="animals" title="Moo"></span>
mauryapari commented 3 weeks ago

I am starting with this. @TheJaredWilcurt