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
Don't look for a configuration file outside the project directory #8303
Comments
@fisker Unlike ESLint and EditorConfig, Prettier's configuration file isn't hierarchical. Once it's found, the resolution process stops, so it's always "root" anyway. But I'm also talking about a use case when there is no configuration file at all. If the user wants to use all the defaults, they don't need a config file. Looks like the docs should recommend doing this for now: Line 1 in d47a225
|
In this case, the submodule folder with prettier empty config {} still not work, it get affected by parent config. To me it's a bug. |
@QimatLuo Is your message about the current behavior of Prettier or about the logic proposed in this issue? If former, please provide more specific reproduce steps and a sample repo on GitHub. (I must notice though that Prettier doesn't have a notion of "parent config". Configs aren't hierarchical.) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Cannot replicate with newest prettier version. |
Pass this
stopDir option should fix this.
|
I'm going to postpone this, can't get it done before v3 release. |
Related? #13538 |
We'll accept this. |
Can anyone explain please, I have |
When looking for the
.editorconfig
file, Prettier doesn't climb all the way up the file system. It finds the 'project (repository) root' and stops there. It would make sense to adjust the resolution of configuration files the same way..editorconfig
and.prettierrc
are resolved differently.But this would be a breaking change.
Thoughts?
The text was updated successfully, but these errors were encountered: