-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
requireConfig only if there's prettier config, and then also use .editorconfig #2402
Comments
I like the idea. I think we'd need to add a new config Happy to take a PR. |
This is a much better default in my opinion. I originally specified the |
Looks like 5624041 intended to fix this? However, it doesn't seem to work like that in 9.5.0. When I'm working on a clone of https://github.com/andrewkeig/express-validation, every .js file gets reformatted on save, despite no prettier configuration being present. If I delete My relevant settings are: {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.requireConfig": true,
"editor.formatOnSave": true
} |
From playing around with "Install another version" in vscode, this appears to be a regression introduced in 9.0.0. When I go back to 8.2.0, it works fine and just logs:
whereas with 9.0.0 it goes:
|
@papandreou I don't know why, but the content of that commit has already been deleted at c75c9d3#diff-03d72b89529ec98f4ae054a185a457dee5e48b2c90ea69dd869496fbdc194998. |
Hey, is there any update on this? It's super annoying to always have to do |
This commit fixes prettier#2402 by reintroducing changes from 5624041.
This issue has been labeled as stale due to inactivity. Reply to keep this issue open. |
This problem still exists in v9.12.0, please unmark as stale. |
Description of feature
requireConfig of only prettier config, and if it exists then also use .editorconfig (If editorconfig exist but prettier config does not exist, skip the file)
Is your feature request related to a problem? Please describe.
I have a monorepo with multiple project and a root editorconfig and I've also defined
prettier.requireConfig: true
. In a project that has prettier, formatting with prettier works perfectly and merges the root's editorconfig with the project prettierrc. However, few of the projects does not have a prettier config file, but they still get formatted with prettier (and its default settings) due to the root's editorconfig.If configuring
prettier.useEditorConfig: false
, it solves the issue for the projects without prettier config, but the projects with prettier config does not use the editorconfig for formatting anymore.Describe the solution you'd like
Perhaps adding another option to
requireConfig
namedprettierOnly
Describe alternatives you've considered
Moving .editorconfig up to the specific projects and remove the root's editorconfig. You'd need to copy it to any new project, and changes will need to be copied across all the projects
The text was updated successfully, but these errors were encountered: