You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding prettier as an option all the scaffolding works as expected. When testing the project on any file change the autoformat save defined does nothing.
Expected behavior
I would expect on save to format the whole document with prettier
How to reproduce
Scaffold a new project with prettier. What I've found out is that @vue/eslint-config-prettier is indeed installed in the repository but it's not added to the eslint.config.ts file.
So we are missing:
import prettierConfig from '@vue/eslint-config-prettier'
export default defineConfigWithVueTs(
...
prettierConfig
)
The text was updated successfully, but these errors were encountered:
Yes, this is expected, as @haoqunjiang thinks that the formatting slows the linter too much and chose to include skipFormatting by default (see the README of https://github.com/vuejs/eslint-config-prettier for a more thorough explanation). Nothing stops you to use prettier in the eslint config though (which is what I personally do).
I understand it but seems confusing adding the option to have prettier and then not having fully set up as someone wanting to use prettier would expect. Maybe add some comments to point out for further reading.
Also why installing a package it's not used. Overall confusing.
The package is used with the format command as explained in the README.
We definitely welcome PR to improve the config, so feel free to open one at https://github.com/vuejs/eslint-config-prettier to add some helpful comments in the generated config 👍
Describe the bug
When adding prettier as an option all the scaffolding works as expected. When testing the project on any file change the autoformat save defined does nothing.
Expected behavior
I would expect on save to format the whole document with prettier
How to reproduce
Scaffold a new project with prettier. What I've found out is that
@vue/eslint-config-prettier
is indeed installed in the repository but it's not added to theeslint.config.ts
file.So we are missing:
The text was updated successfully, but these errors were encountered: