Skip to content

prompt-cli does not work with custom config file paths #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 4 tasks
n0nick opened this issue May 9, 2018 · 5 comments
Open
1 of 4 tasks

prompt-cli does not work with custom config file paths #340

n0nick opened this issue May 9, 2018 · 5 comments

Comments

@n0nick
Copy link

n0nick commented May 9, 2018

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:

  1. npm run commit --config </path/to/config.js>
  2. COMMITLINT_CONFIG=/path/to/config.js npm run commit
  3. { 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
  • prompt
  • config-angular

Your Environment

Executable Version
commitlint --version 6.2.0
git --version 2.17.0
node --version 8.9.0
@marionebl
Copy link
Contributor

A PR adding the needed functionality to prompt-cli is very welcome!

@polaroidkidd
Copy link

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?

@escapedcat
Copy link
Member

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?

@polaroidkidd
Copy link

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.

@escapedcat
Copy link
Member

escapedcat commented Dec 3, 2020

Welcome! Yeah, please do. You ask in the chat as well if you want: https://devtoolscommunity.herokuapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants