CommitLint with Yarn v2 (Plug'n'play)
See original GitHub issueExpected 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:
Affected packages
- cli
- core
- prompt
- config-angular
Steps to Reproduce (for bugs)
Link for my repo (bypass git hook)
- yarn init && yarn set version berry
- yarn add -D @commitlint/config-conventional @commitlint/cli husky
- yarn husky install
- echo “module.exports = {extends: [‘@commitlint/config-conventional’]}” > commitlint.config.js
- npx husky add .husky/commit-msg ‘npx --no-install commitlint --edit “$1”’
- 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 |
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (2 by maintainers)
Top Results From Across the Web
CommitLint with Yarn v2 (Plug'n'play) - Bountysource
Expected Behavior. In the yarn v1 and yarn v2 (with nodeLinker: node_modules ), commitlint work perfectly ...
Read more >plug-and-play - npm
Node.js Plug-And-Play package. Easily create hooks and let users plug their own logic across your code to make it extensible by everyone with...
Read more >CommitLint in yarn v2 - Stack Overflow
I've checked this with CommitLint Devs. He said that currently it isn't supported. You can have a look here.
Read more >Yarn 2 (Berry) - Plug'n'play, Constraints and Workspaces
Let's check out Yarn v2 and its amazing new features. There's plug-n-play loading for node modules that gives you much better loading ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sure, here is a trimmed copy: https://github.com/plus-/yarn-commitlint-sample
Context for anyone that stumbles upon this: If you’re using Plug n Play, you’ll want to go
.husky/commit-msg
and update the npx command to be the yarn run command, as listed here: https://github.com/conventional-changelog/commitlint/issues/2637#issuecomment-866118830It essentially works, but the current documentation doesn’t fully account for it.