Skip to content
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

Conflict between ESLint, Prettier, and VS Code Auto Formatting on Save #236

Closed
alexjohndoe opened this issue Mar 2, 2023 · 2 comments
Closed

Comments

@alexjohndoe
Copy link

I used create-vue to create a new project with both ESLint and Prettier enabled.

I also configured VS Code to auto-format on save without any additional customizations.

When I ran npm run lint, I got the formatting results I wanted. However, when I hit ctrl + S to save, the formatting changed to a style I did not want. This has caused a conflict, and I'm not sure how to resolve it. Could you please help me understand what's causing this and how to fix it?

Thank you. ❤️

@ebisbe
Copy link

ebisbe commented Oct 3, 2023

Have you set 'prettier/prettier' as an error on the eslint file?

Like this:

rules: {
    'prettier/prettier': 2
  },

@haoqunjiang
Copy link
Member

This issue should have been resolved now that we set prettier as the default formatter: #442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants