Hello,
I'm working on a monorepo with backend and frontend and a .czrc at the directory's root to enforce commit rules with commitizen.
All frontend-related files are in a subdirectory, including the package.json file at different filesystem levels.
My issue: In a subdirectory with a package.json between pwd and git repository root, commitizen seems to acknowledge this file as a configuration file despite the lack of config.commitizen key.
Fix proposal: There seems to be a mechanism to check the package.json has a commitizen configuration, but it is commented:
|
findup(configs, { nocase: true, cwd: directory }, function (configPath) { |
|
if (path.basename(configPath) === 'package.json') { |
|
// return !!this.getContent(configPath); |
|
} |
|
|
|
return true; |
|
}) |
I tried to uncomment it in a local version of commitizen, and it works as expected.
Would it be possible to uncomment it or does it have unwanted side effects?
Hello,
I'm working on a monorepo with backend and frontend and a
.czrcat the directory's root to enforce commit rules with commitizen.All frontend-related files are in a subdirectory, including the
package.jsonfile at different filesystem levels.My issue: In a subdirectory with a package.json between
pwdand git repository root,commitizenseems to acknowledge this file as a configuration file despite the lack ofconfig.commitizenkey.Fix proposal: There seems to be a mechanism to check the package.json has a commitizen configuration, but it is commented:
cz-cli/src/configLoader/loader.js
Lines 30 to 36 in 2e57fd0
I tried to uncomment it in a local version of commitizen, and it works as expected.
Would it be possible to uncomment it or does it have unwanted side effects?