Skip to content

Error when used with Husky: "Please add rules to your commitlint.config.js" #583

Closed
@nareshbhatia

Description

@nareshbhatia

Expected Behavior

The following Husky hook used to work perfectly with "@commitlint/cli": "^7.2.1" and "husky": "^1.2.1"

  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  },

Current Behavior

Today I started getting the following error:

Please add rules to your commitlint.config.js

I have never needed this file before!

image

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

I added the commitlint.config.js file to fix the problem, but it seems mysterious how this started appearing suddenly.

Note: I do not understand how HUSKY_GIT_PARAMS works. The husky documents do not quite explain it.

Steps to Reproduce (for bugs)

You can see my fixed project here: https://github.com/archfirst/joinjs. The previous commit did not work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions