eslint_d.js: Incorrect indentation on fix.
When fixing (or fixing to stdout) eslint_d does not indent fixed lines properly.
Input code:
<template>
<section class="navbar-container">
<v-app-bar color="#fff"
flat
/>
</section>
</template>
(according to my eslint rules color directive on line 3 must be on separate line ('color' should be on a new line. [Warning/vue/max-attributes-per-line])
and eslint <file> --fix corrects it to:
<template>
<section class="navbar-container">
<v-app-bar
color="#fff"
flat
/>
</section>
</template>
while cat <file> | eslint_d --stdin --fix-to-stdout will produce:
<template>
<section class="navbar-container">
<v-app-bar
color="#fff"
flat
/>
</section>
</template>
Am I doing something wrong or is that a bug?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (10 by maintainers)
Commits related to this issue
- Document fix for .vue files not autofixed (#154) Addresses #145 #142 — committed to mantoni/eslint_d.js by deleted user 3 years ago
I just have, with great excitement, but unfortunately it still ignores indent.
Ah, nicely done! Thank you so much for looking into this. I don’t think I can help any further though, although I would love to, I am only learning JS and Vue right now, definitely have no knowledge nor experience to put fixing PR in place…