Skip to content

Commit dc1942e

Browse files
committed
fix(config): prioritized package.json last when looking for config files
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 commitizen#478
1 parent 0023958 commit dc1942e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commitizen/configLoader.js

Lines changed: 1 addition & 1 deletion
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)