Comments (6)
Please update to commitlint@3, it already ignores version commits out of the box:
npm install @commitlint/cli @commitlint/config-angular
echo "0.1.8" | commitlint --extends=@commitlint/config-angular
from commitlint.
you are missing the -e
flag in the husky-driven call:
{
"scripts": {
"husky": "commitlint --extends=@commitlint/config-angular -e"
}
}
from commitlint.
Thanks for the report. Can you verify you are using the latest @commtlint/cli
?
from commitlint.
"conventional-changelog-cli": "^1.3.3",
"conventional-changelog-lint": "^2.1.1",
from commitlint.
Ohh. I checked:
-
install global and run in terminal
echo "0.1.8" | commitlint --extends=@commitlint/config-angular
- it work. -
install global
package.json
"scripts": {"commitmsg": "commitlint --extends=@commitlint/config-angular" }
"devDependencies": {"husky": "^0.14.3"}
run in terminal
git commit -m "chore: anything"
husky > npm run -s commitmsg (node v8.4.0) /usr/local/lib/node_modules/@commitlint/cli/cli.js:126 throw err; ^ Error: Cannot find module '@commitlint/config-angular' at Function.Module._resolveFilename (module.js:489:15) at resolveFileName (/usr/local/lib/node_modules/@commitlint/cli/node_modules/resolve- from/index.js:17:39) at resolveFrom (/usr/local/lib/node_modules/@commitlint/cli/node_modules/resolve-from/index.js:31:9) at module.exports (/usr/local/lib/node_modules/@commitlint/cli/node_modules/resolve-from/index.js:34:41) at resolveId (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:108:35) at resolveConfig (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:99:18) at /usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:50:18 at Array.reduce (<anonymous>) at loadExtends (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:48:32) at resolveExtends (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/resolve-extends.js:31:17) husky > commit-msg hook failed (add --no-verify to bypass)
-
install as devDependencies
package.json
"scripts": {"commitmsg": "commitlint --extends=@commitlint/config-angular" }
"devDependencies": {"@commitlint/cli": "^3.2.0","@commitlint/config-angular": "^3.1.1" ,"husky": "^0.14.3"}
run in terminal
git commit -m "chore: anything"
husky > npm run -s commitmsg (node v8.4.0) /usr/local/lib/node_modules/@commitlint/cli/cli.js:126 throw err; ^ TypeError: Expected a raw commit at parser (/usr/local/lib/node_modules/@commitlint/cli/node_modules/conventional-commits-parser/lib/parser.js:17:11) at sync (/usr/local/lib/node_modules/@commitlint/cli/node_modules/conventional-commits-parser/index.js:96:10) at $If_1 (/usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/parse.js:37:13) at /usr/local/lib/node_modules/@commitlint/cli/node_modules/@commitlint/core/lib/library/parse.js:29:19 at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) husky > commit-msg hook failed (add --no-verify to bypass)
from commitlint.
Sorry my fail. Thanks !!!
from commitlint.
Related Issues (20)
- fix: error TS2307: Cannot find module 'conventional-commits-parser' or its corresponding type declarations. HOT 6
- Using config example gives error running 19.0.3 HOT 22
- @commitlint/config-nx-scopes | Error [ERR_REQUIRE_ESM]: require() of ES Module Not Supported HOT 2
- Can not use @commitlint/cz-commitlint as commitizen's adapter HOT 5
- Commitlint cli running 19.0.3 gives error HOT 19
- fix: console show DeprecationWarning info when use @commitlint\[email protected]
- wrapper.mjs is not included in published @commitlint/config-conventional package HOT 11
- fix(conventional): should not allow scope with dash inside HOT 3
- ERR_IMPORT_ASSERTION_TYPE_MISSING with json config package
- fix: @commitlint/config-nx-scopes not working for nx since version v19
- fix: `commitlint --last` fails HOT 2
- commitlint --edit does not change commit message once you enter a invalid commit message
- fix: Docs missing `issuePrefixes` HOT 3
- feat: <Badge for using commitlint in your repo> HOT 2
- refactor: switch from chalk to styleText (node:util) HOT 4
- feature: add flag to enable/disable multiple-scopes (default: enabled) HOT 13
- docs: Instructions for filtering nx projects are out of date
- fix: Git submodule file priority on commit message edit
- docs: add dockerhub docs
- fix: @commitlint/config-nx-scopes does not support [email protected] HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commitlint.