A
A
Andy Oker2022-02-05 11:13:25
Vue.js
Andy Oker, 2022-02-05 11:13:25

How to force ESlint + Prettier to wrap tag attributes if there are more than 2 of them?

I am using ESlint. How to force linter to do this:

<template>
   <ComponentFile :a="a" :b="b" :c="c" disabled>
</template>


Something like this:
<template>
   <ComponentFile 
      :a="a" 
      :b="b" 
      :c="c" 
      disabled
   >
</template>


I know there's a 'vue/max-attributes-per-line' thing, but I also use prettier and it doesn't seem to work because of it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question