conventional-changelog/commitlint

`parserPreset` in `.commitlintc.json` is ignored

Geschlossen

#4.091 geöffnet am 19.06.2024

 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (896 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (15.497 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 12h 56m) (52 gemergte PRs in 30 T)

Beschreibung

Steps to Reproduce

  1. Create .commitlintrc.json with the following contents
{
  "extends": ["@commitlint/config-conventional"],
  "parserPreset:": {
    "parserOpts": {
      "issuePrefixes": ["PREFIX-"]
    }
  },
  "rules": {
    "references-empty": [2, "never"]
  }
}
  1. Run echo "feat: some feature (PREFIX-123)" | npx commitlint and observe how an error for empty references is thrown.
  2. Run npx commitlint --print-config and observe how parserPreset.parserOpts.issuePrefixes is [ '#' ].

With a commitlint.config.js this does not happen.

Current Behavior

see above.

Expected Behavior

It should correctly pick up parserPreset from the JSON configuration.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Context

No response

commitlint --version

@commitlint/cli@19.3.0

git --version

2.45.2

node --version

v20.13.1

Contributor Guide