Skip to content

Commit 5f8902e

Browse files
travijimthedev
authored andcommitted
fix(config): prioritized package.json last when looking for config files (#484)
since package.json was prioritized first, it is always found and always used, even if it does not contain commitizen config. the other optional config files are never found as a result. this change looks for the optional files first and only lands on the package.json if the other files do not exist fixes #478
1 parent 4b8f29a commit 5f8902e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commitizen/configLoader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {loader} from '../configLoader';
33
export { load };
44

55
// Configuration sources in priority order.
6-
var configs = ['package.json', '.czrc', '.cz.json'];
6+
var configs = ['.czrc', '.cz.json', 'package.json'];
77

88
function load (config, cwd) {
99
return loader(configs, config, cwd);

0 commit comments

Comments
 (0)