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

Overriding "prettier-vue/prettier" as "error" breaks Vite #17

Closed richardtallent closed 3 years ago

richardtallent commented 3 years ago

After doing some dependency updates, Vite started erroring out on files that previously worked fine.

This was apparently because my class list (using Tailwind) was so long that Prettier could no longer fit it within the printWidth, but with this plugin setting all rules for "prettier-vue/prettier" to "error", it couldn't get past that issue.

I had to set rules: { "prettier-vue/prettier": "warn" } to override it.

Prettification issues shouldn't halt dev servers... there are too many variables to both pass all standard linter rules for Vue and to do so within Prettier's over-opinionated, limited configuration. I suggest setting this to warn instead of error.

meteorlxy commented 3 years ago

You can set to "warn" for sure. "error" is just a recommendation, but not required.

Anyway, what you reported should be an issue of prettier or tailwind, but not this plugin. It did nothing but integrate prettier into eslint.