Skip to content

Commit

Permalink
feat: support JSON config file (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
tansan-dev authored Dec 4, 2024
1 parent ba73eb3 commit 987ace4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/read-config-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ const readConfigFile = (CZ_CONFIG_NAME = '.cz-config.js') => {
return czConfig;
}

const czConfigJSON = findConfig.require(`${path.parse(CZ_CONFIG_NAME).name}.json`, { home: false })

if (czConfigJSON) {
return czConfigJSON
}

// fallback to locating it using the config block in the nearest package.json
let pkg = findConfig('package.json', { home: false });

Expand Down

0 comments on commit 987ace4

Please sign in to comment.