question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't release because commit does not validate with commitlint

See original GitHub issue

Using,

    "@commitlint/cli": "^5.0.0",
    "@commitlint/config-angular": "^5.0.0",

with standard version, fails with:

husky > npm run -s commitmsg (node v8.4.0)

⧗   input: chore(release): 1.0.0
✖   subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
✖   type must be one of [build, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
✖   found 2 problems, 0 warnings

husky > commit-msg hook failed (add --no-verify to bypass)

Command failed: git commit CHANGELOG.md package.json package-lock.json -m "chore(release): 1.0.0"
husky > npm run -s precommit (node v8.4.0)

Running tasks for *.js [started]
Running tasks for *.js [skipped]
→ No staged files match *.js
husky > npm run -s commitmsg (node v8.4.0)

⧗   input: chore(release): 1.0.0
✖   subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
✖   type must be one of [build, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
✖   found 2 problems, 0 warnings

Perhaps the type and message need to be adjusted?

//cc @marionebl @bcoe

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
marioneblcommented, Nov 20, 2017

This is caused by commitlint switching to the new Angular (vs. Angular.js) commit conventions with version 5.0.0.

I think we should update standard-version to match the latest conventions.

You can fall back to @commitlint/config-angular@4 until that lands.

0reactions
bcoecommented, Nov 28, 2017

@satazor see conversation here, @marionebl has done a great job of outlining some of the work that we’d need to take on to simplify the commit conventions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

husky - Strange error when attempting to commit. [subject-empty]
Another Solution you can try is. git commit --no-verify -m "Hello World!" ... commit messages. If the template is not fulfilled, one gets...
Read more >
commitlint - Lint commit messages
commitlint helps your team adhere to a commit convention. By supporting npm-installed configurations it makes sharing of commit conventions easy.
Read more >
How to Write Good Commit Messages with Commitlint
Commitlint is a simple tool that lints your commit messages and makes sure they follow a set of rules. It runs as a...
Read more >
Commitlint: validate commit conventions automatically
If they don't, there are no checks, and you cannot check your conventions. ... Since Commitlint utilizes Husky, we need to install it...
Read more >
git-commit-msg-linter - npm
As a hook it will run at every commiting to make sure that the message to commit is valid against the conventions. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found