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

self-closing rule not working #16

Closed zigomir closed 3 years ago

zigomir commented 3 years ago

eslint will ignore self–closing SFC component rule when I have "prettier/vue" listed in my eslint config like so

"extends": [
  "standard",
  "plugin:@typescript-eslint/recommended",
  "plugin:vue/vue3-recommended",
  "plugin:prettier-vue/recommended",
  "prettier/standard",
  "prettier/vue"
]

Not sure where exactly the issues lies, but I though I should report it here.

I'm using Vue 3 and eslint-plugin-prettier-vue: 3.0.0-alpha.2.

meteorlxy commented 3 years ago

You must understand prettier & eslint first.

If you are using prettier, then almost all of the "code styles" are enforced to be "prettier style". That mean, all eslint "code style rules" should be disabled, and everything related to code style is handled by prettier only.

That's the reason why prettier calls itself an opinionated code formatter

zigomir commented 3 years ago

👍 got it, thanks!