-
Notifications
You must be signed in to change notification settings - Fork 206
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
Fix/locate all prettier configs #97
Fix/locate all prettier configs #97
Conversation
@@ -168,12 +169,20 @@ function writeExtraEntry(name, {cjs, esm}, clean = true) { | |||
) | |||
} | |||
|
|||
function hasLocalConfig(moduleName, searchOptions = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't prettier have a function for finding config? Maybe we should use that instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it does.
I was thinking that this eventually this could be used for the other commands as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT 👍 Thanks!
@all-contributors please add @schaab for code and tests |
I've put up a pull request to add @schaab! 🎉 |
🎉 This PR is included in version 1.9.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Fixes #96
What:
The
format
command does not recognize all local configuration file typesWhy:
The docs state that the tool will respect a local configuration for a tool and use that over the default.
How:
Leverage
cosmiconfig
to search for any type of local configuration.Prettier
uses it for config file support. This allows us to look for a module name rather than maintaining a list of files types to look for.Checklist: