Skip to content

Missing prettierConfig on eslint.config.ts file #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ebisbe opened this issue May 27, 2025 · 3 comments
Closed

Missing prettierConfig on eslint.config.ts file #755

ebisbe opened this issue May 27, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@ebisbe
Copy link

ebisbe commented May 27, 2025

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 the eslint.config.ts file.

So we are missing:

import prettierConfig from '@vue/eslint-config-prettier'

export default defineConfigWithVueTs(
  ...
  prettierConfig
)
@ebisbe ebisbe added the bug Something isn't working label May 27, 2025
@cexbrayat
Copy link
Member

Hi @ebisbe

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).

@ebisbe
Copy link
Author

ebisbe commented May 27, 2025

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.

@cexbrayat
Copy link
Member

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants