Skip to content
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

customizing helpUrl #781

Closed
1 of 4 tasks
naimo84 opened this issue Sep 3, 2019 · 3 comments
Closed
1 of 4 tasks

customizing helpUrl #781

naimo84 opened this issue Sep 3, 2019 · 3 comments

Comments

@naimo84
Copy link

naimo84 commented Sep 3, 2019

it seems, that the helpUrl is hardcoded in the cli

Expected Behavior

image

Current Behavior

image

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

const output = format(report, {
color: flags.color,
verbose: flags.verbose,
helpUrl: flags.helpUrl
});

Context

We have some custom rules for our commit rules in our confluence, so I'd like to reference it in the helpUrl

Executable Version
commitlint --version 8.1.0
git --version 2.23.0.windows.1
node --version 10.15.0
@arvinzzq
Copy link

arvinzzq commented Mar 4, 2020

Is there any doc about customizing helpUrl?
All I found is to set

{
  formatter: '@commitlint/format',
}

in commitlint.config.js, but the value of property formatter should be type of string. It confused me that how to use the solution above:

  const output = format(report, {
      color: flags.color,
      verbose: flags.verbose,
      helpUrl: flags.helpUrl
  });

@escapedcat
Copy link
Member

Hey @zz1211, you're right, it's not yet mentioned in the docs. It should be.
helpUrl is a flag you can set for the commitlint command in your package.json like this:

"husky": {
  "hooks": {
    "commit-msg": "commitlint -E HUSKY_GIT_PARAMS --help-url='https://github.com'"
  }
},

Does this help?

@arvinzzq
Copy link

arvinzzq commented Mar 6, 2020

Hey @zz1211, you're right, it's not yet mentioned in the docs. It should be.
helpUrl is a flag you can set for the commitlint command in your package.json like this:

"husky": {
  "hooks": {
    "commit-msg": "commitlint -E HUSKY_GIT_PARAMS --help-url='https://github.com'"
  }
},

Does this help?

Hi @escapedcat , thanks, it helps me 😊

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

No branches or pull requests

3 participants