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

fix: ignores section in .commitlintrc.yaml fails validation #4188

Open
4 tasks
ddeepwell opened this issue Nov 1, 2024 · 0 comments
Open
4 tasks

fix: ignores section in .commitlintrc.yaml fails validation #4188

ddeepwell opened this issue Nov 1, 2024 · 0 comments
Labels

Comments

@ddeepwell
Copy link

Steps to Reproduce

Using a `.commitlintrc.yaml` file containing:

extends:
  - "@commitlint/config-angular"
rules:
  type-enum:
    - 2
    - always
    - - build
      - ci
      - docs
      - feat
      - fix
      - perf
      - refactor
      - test
      - release
      - revert
ignores:
  - commit => commit.includes('WIP')
help: |
  **Possible types**:
  `build`:    Changes that affect the build system or external dependencies
  `ci`:       Changes to our CI configuration files and scripts
  `docs`:     Documentation only changes
  `feat`:     A new feature
  `fix`:      A bug fix
  `perf`:     A code change that improves performance
  `refactor`: A code change that neither fixes a bug nor adds a feature
  `test`:     Adding missing tests or correcting existing tests

run commitlint.

Many iterations on the format of `ignores` have been attempted to convince commitlint that the input is a function, but have had no success.

Current Behavior

Running commitlint with a yaml configuration file with an ignores section raises the error:

Error: Commitlint configuration in /path/to/.commitlintrc.yaml is invalid:
	- "/ignores/0" should be a function. Value: "commit => commit.includes('WIP')".

Expected Behavior

It appears I have an incorrect format for the .commitlintrc.yaml file, but am unaware of what the correct format should be, nor have I found the documentation regarding this for yaml files.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Improve documentation?

Context

No response

commitlint --version

19.5.0

git --version

2.45.2

node --version

v22.10.0

@ddeepwell ddeepwell added the bug label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant