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 2.0 is out #7

Closed Janther closed 4 years ago

Janther commented 4 years ago

It comes with new default options.

"arrowParens": "always"
"trailingComma": "es5"

and the last one that I had no idea how to configure was "space-before-function-paren". This is not an option, it's the default. And I could not remove error Delete `·` prettier-vue/prettier from my Eslint report.

Any help?

meteorlxy commented 4 years ago

Well, space-before-function-paren of ESLint should always be disabled if you are using prettier.

You may use eslint-config-standard as many other vue packages, so you want space-before-function-paren. But the truth is that most of other style guides do not use it.

Extend prettier/standard to make prettier works with eslint-config-standard:

extends: [
    'standard',
    'plugin:prettier-vue/recommended',
    'prettier/standard',
]

See https://github.com/prettier/prettier/issues/3845

Janther commented 4 years ago

I used the configuration provided and am still getting this error.

By the way, it's not that I want this, Prettier 2.0 does this by default. I have no choice here, unless I go to a lower version of prettier.

https://prettier.io/blog/2020/03/21/2.0.0.html

Janther commented 4 years ago

anyway this issue is to ask for help but also to let you know that this package is incompatible with the latest Prettier and you might want to update the readme explaining what configuration is suggested for Prettier 2.0

meteorlxy commented 4 years ago

I'll update it asap

meteorlxy commented 4 years ago

Version 2.1.0 released !

Suggestion and feedback welcome!

Janther commented 4 years ago

Thank you, it works perfectly. I just got the opportunity to use this.