cosmiconfig
cosmiconfig copied to clipboard
cosmiconfig-(meta)-config
Hey! Great library! Using it for a few projects of mine, and that is a problem - the more I use it - the more different files in different places I do have.
Proposal
- Allow cosmiconfig configuration via config files in the same way it powers end-solutions
- Allow tapping into config file parsing and discovery, so I can configure other solutions using single configuration file. This is similar, if not equal to having config in
package.json, just not bound to the package boundary.
// metaconfig.yml
lintstyled:
lintstyled-config
prettier:
prettier-config
- Allow programmatic override of the functionality above, so I can configure the fleet of my tools in a different way using a "virtual file system", so it would be completely transparent to the end users.
// cosmiconfig.js
export const tapVirtualFile = (folder, pattern) => {
if (specialFolders.include(folder)) {
return specialConfigs[pattern]
}
}
There is no real need to implement this, but I have to describe the opportunity and the possible use cases.
Hi @theKashey! Are you unable to do these things right now, by customizing your searchPlaces and loaders?
Well, if we are speaking about tapping into third-party solutions - then yes, I cannot change their code.