Possible mistake in behavior of "prettier.requireConfig"
See original GitHub issueFrom the README file:
The extension is enabled.
I don’t have a .prettierrc
file.
I do have an .editorconfig
file.
My settings.json
:
When I format a document I expect that prettier not to work (due to the settings).
But when I right-click and format the document, the document is formatted and in the Prettier
terminal I receive this message:
While the docs mention that using prettier.requireConfig
will enable prettier only if a prettier config file is present, the real behavior (and as seen in the terminal message is that prettier
is being used if a prettier config or an editorconfig files are present.
I’m working on several projects that some have prettier and some not.
I want to use this property (prettier.requireConfig
) to enable prettier conditionally only if a .prettierrc is present
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
Just ran into this issue while taking a look at the mithril project. They have an .editorconfig file but do not appear to use prettier.
It would be nice if the docs clarified that
.editorconfig
is considered a prettier configuration file by this extension, and to only auto-format on prettier config files specifically, you need to setprettier.useEditorConfig
to false.This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.