meteorlxy / eslint-plugin-prettier-vue

:ok_hand: ESLint plugin for Prettier formatting, which is better for Vue SFC
MIT License
115 stars 9 forks source link

prettier 'vueIndentScriptAndStyle=true' doesnt work #12

Closed zta7 closed 4 years ago

meteorlxy commented 4 years ago

Yes, because this plugin does not process the whole .vue file. It's a known limitation

meteorlxy commented 4 years ago

It should be listed in the docs

zta7 commented 4 years ago

it's possible to resolve ? or a limitation ? it's the only short for me to use this plugin. ~(i dont like prettier format everything without enough options to choose~)

meteorlxy commented 4 years ago

It a limitation of our current workflow:

Split .vue file to several blocks -> Put these blocks to prettier independently.

BTW, I think the official style guide of Vuejs does not encourage indent in script and style block of .vue file

meteorlxy commented 4 years ago

It's possible to resolve, but we need to change the behavior of processing <script> and <style> blocks 🤔

meteorlxy commented 4 years ago

Fixed in v2.1.1

holyrong commented 3 years ago

@meteorlxy my vs code doesn't work , too. prettier:2.3.2

prettier.config.js like this: image .eslintrc.js image

but there're none indentation inside Githubissues.

  • Githubissues is a development platform for aggregating issues.