0

I just updated an Angular 11 app to eslint and installed commitizen, commitlint, husky and semantic-release to drive CI through npm and Travis.

I followed the instructions on the Angular recommended link.

Linting itself works fine.

The problem shows up in the commit-msg hook but is caused earlier.

Now when I run npx git-cz I get a different set of types for "type of commit".

I get Fix, Update, Breaking, Docs, Build, New, Upgrade.

Previously I got the Angular standard list "feat, fix, docs, style, refactor, perf, test, ci, chore, revert."

The commit-msg hook fails for two reasons:

  1. type must be lower-case
  2. type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]

I have spent several hours reading all the relevant docs but can't find how to change the list of types back to what it was.

Any suggestions would be very welcome.

Chris Curnow
  • 643
  • 5
  • 15

1 Answers1

1

The problem only arose when I installed cz-adapter-eslint.

This adapter itself is based on conventional-changelog-eslint (https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint)

It is this changelog file which introduces the change from Angular commit messages to ESLint Convention commit message format.

The simple fix was to remove cz-adapter-eslint.

I will have to look at this further when I have time to find out the recommended adapters.

Chris Curnow
  • 643
  • 5
  • 15