[question] Why not .prettierignore? #597

Closed
opened 2026-02-04 20:29:26 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Elllone on GitHub (Oct 31, 2024).

The repository specifies the editor.formatOnSave setting for VS Code, which formats the code upon saving.
When modifying docker-compose-*.yml files, double quotes are formatted into single quotes.
However, I noticed that in the repository, they are reverted back to single quotes.
Why not add a .prettierignore file to prevent these files from being formatted?

Originally created by @Elllone on GitHub (Oct 31, 2024). The repository specifies the editor.formatOnSave setting for VS Code, which formats the code upon saving. When modifying docker-compose-*.yml files, double quotes are formatted into single quotes. However, I noticed that in the repository, they are reverted back to single quotes. Why not add a .prettierignore file to prevent these files from being formatted?
Author
Owner

@meltyshev commented on GitHub (Oct 31, 2024):

Hi! I think this might be due to a global VS Code setting, such as having editor.defaultFormatter set to prettier globally. Adding a .prettierignore will solve the issue for you, though others might use different formatters and we can't add ignore files for each one. There may be a way to disable any global formatter per project by setting editor.defaultFormatter to false in .vscode/settings.json, but need to try how it works.

@meltyshev commented on GitHub (Oct 31, 2024): Hi! I think this might be due to a global VS Code setting, such as having `editor.defaultFormatter` set to `prettier` globally. Adding a `.prettierignore` will solve the issue for you, though others might use different formatters and we can't add ignore files for each one. There may be a way to disable any global formatter per project by setting `editor.defaultFormatter` to `false` in `.vscode/settings.json`, but need to try how it works.
Author
Owner

@Elllone commented on GitHub (Oct 31, 2024):

Hi! Thanks for answer!

@Elllone commented on GitHub (Oct 31, 2024): Hi! Thanks for answer!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#597