commitlint
commitlint copied to clipboard
prompt-cli does not work with custom config file paths
Following #100, there is no way to run prompt-cli with a specific config file path. It just assumes the default which is commitlint.config.js under the repository's root.
Expected Behavior
Either:
npm run commit --config </path/to/config.js>COMMITLINT_CONFIG=/path/to/config.js npm run commit{ config: { '@commitlint/prompt-cli': { config: '/path/to/config.js' } } }in package.json
Current Behavior
prompt-cli runs with no customizations in place (no type/scope enums loaded etc.)
Affected packages
- [ ] cli
- [ ] core
- [x] prompt
- [ ] config-angular
Your Environment
| Executable | Version |
|---|---|
commitlint --version |
6.2.0 |
git --version |
2.17.0 |
node --version |
8.9.0 |
A PR adding the needed functionality to prompt-cli is very welcome!
I am facing the same issue. I wouldn't mind much doing this over the christmas break. Would a path or location configuration parameter in package.json be the right approach?
Hey @polaroidkidd ,
I would suggest it should try to find the config in these (default) places: https://commitlint.js.org/#/guides-local-setup?id=install-commitlint and/or using the --path as described in this issue.
So we do not need another parameter to check for in the configs.
Does this make sense to you?
Hii @escapedcat
Thank you for your input and I agree with you (less additional parameter checks === less room for errors in my view).
I've forked the repo, had a look around and from what I can see I don't think it's too complicated to implement. If I have any questions I'll post them here.
Welcome! Yeah, please do. You ask in the chat as well if you want: https://devtoolscommunity.herokuapp.com