You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I must first say that it's very courteous indeed that commitizen at least looks for its configs under a top-level config key in package.json, rather than forcing us to jam another bespoke key name in that file like so many other packages do, but… definitely this, please!
is there something special desired about cosmiconfig that isn't handled currently? i've been using .czrc files in my projects for quite a while. here are the currently supported sources:
From what I remembered since my last post, what I wanted to do is "import" my configuration from a package instead of having it in the root folder i.e for prettier I can do that:
I mean that configLoader is used by cz-cli to determine the preset, but preset with additional configurations must also call configLoader to load them, otherwise rc file configurations won't be read.
But IMHO this issue's main purpose is the lack of documentation concerning configuration files. A simple phrase in README like: "this project uses cosmiconfig" would be enough.
Yes, agree with @fsmaia that the heart of this issue is the lack of documentation around the package's support of config files, though it's hard to know without confirmation from its creator, @zyy7259.
That said, assuming this is correct, the PR above (assuming it's approved and merged) does seem allow this issue to be closed…
Activity
prometheas commentedon May 28, 2018
I must first say that it's very courteous indeed that commitizen at least looks for its configs under a top-level
configkey inpackage.json, rather than forcing us to jam another bespoke key name in that file like so many other packages do, but… definitely this, please!lucascono commentedon Jan 28, 2019
Please, implement cosmiconfig. It is very useful to be able to highlight syntax in text editors according to file extensions.
Nargonath commentedon Jun 19, 2019
Another use case for this is when you want to gather all your configuration into one package ala
react-scripts.fsmaia commentedon May 14, 2020
I would love this too! Any help wanted?
travi commentedon May 14, 2020
is there something special desired about cosmiconfig that isn't handled currently? i've been using
.czrcfiles in my projects for quite a while. here are the currently supported sources:cz-cli/src/commitizen/configLoader.js
Line 6 in a6adb3b
Nargonath commentedon May 14, 2020
From what I remembered since my last post, what I wanted to do is "import" my configuration from a package instead of having it in the root folder i.e for
prettierI can do that:From what I understand such behavior was not possible at least in 2019 when I commented.
fsmaia commentedon May 14, 2020
I found out that the configuration is read in the presets/styles instead of cz-cli. Example:
https://github.com/commitizen/cz-conventional-changelog/blob/master/index.js#L7
Nargonath commentedon May 15, 2020
I'm not sure what you mean by that.
fsmaia commentedon May 15, 2020
I mean that
configLoaderis used by cz-cli to determine the preset, but preset with additional configurations must also callconfigLoaderto load them, otherwise rc file configurations won't be read.But IMHO this issue's main purpose is the lack of documentation concerning configuration files. A simple phrase in README like: "this project uses cosmiconfig" would be enough.
prometheas commentedon May 19, 2020
Yes, agree with @fsmaia that the heart of this issue is the lack of documentation around the package's support of config files, though it's hard to know without confirmation from its creator, @zyy7259.
That said, assuming this is correct, the PR above (assuming it's approved and merged) does seem allow this issue to be closed…
commitizen-bot commentedon Aug 21, 2020
🎉 This issue has been resolved in version 4.1.3 🎉
The release is available on:
Your semantic-release bot 📦🚀
pmcelhaney commentedon Jan 5, 2022
For anyone following this thread I just created a PR to support cosmiconfig attached to #773