conventional-changelog/commitlint

CommitLint with Yarn v2 (Plug'n'play)

Open

#2 637 ouverte le 7 juin 2021

Voir sur GitHub
 (17 commentaires) (3 réactions) (0 assignés)TypeScript (896 forks)batch import
featurehelp wanted

Métriques du dépôt

Stars
 (15 497 stars)
Métriques de merge PR
 (Merge moyen 12h 56m) (52 PRs mergées en 30 j)

Description

Expected Behavior

In the yarn v1 and yarn v2 (with nodeLinker: node_modules), commitlint work perfectly

Current Behavior

It doesn't work at all. I've tried these command in git-hook (husky):

  • npx --no-install commitlint --edit "$1"
  • yarn --no-install commitlint --edit "$1"
  • yarn run --no-install commitlint --edit "$1"

Here is the pictures of this problem: Screen Shot 2021-06-07 at 12 33 55

Screen Shot 2021-06-07 at 12 34 31

Screen Shot 2021-06-07 at 12 34 51

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Steps to Reproduce (for bugs)

Link for my repo (bypass git hook)

  1. yarn init && yarn set version berry
  2. yarn add -D @commitlint/config-conventional @commitlint/cli husky
  3. yarn husky install
  4. echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
  5. npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
  6. Commit change

Context

Your Environment

Mac OS X 10.11.6 El Captain

Executable Version
commitlint --version bash: commitlint: command not found
yarn run commitlint --version @commitlint/cli@12.1.4 (Need yarn run, see here
git --version git version 2.29.2
node --version v14.15.3

Guide contributeur