-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #345 from ForgeRock/commitizen
style: support-commitizen
- Loading branch information
Showing
13 changed files
with
806 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"path": "cz-git", | ||
"$schema": "https://cdn.jsdelivr.net/gh/Zhengqbbb/cz-git@1.6.1/docs/public/schema/cz-git.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
if [ $2 == "template" ]; then | ||
exec < /dev/tty && npm run commit || true | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,57 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const packages = fs.readdirSync(path.resolve(__dirname, 'packages')); | ||
const samples = fs.readdirSync(path.resolve(__dirname, 'samples')); | ||
const e2e = fs.readdirSync(path.resolve(__dirname, 'e2e')); | ||
|
||
/* commitlint.config.js | .commitlintrc.js | ||
@type {import('cz-git').UserConfig} */ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional', '@commitlint/config-nx-scopes'], | ||
prompt: { | ||
alias: { fd: 'docs: fix typos' }, | ||
types: [ | ||
{ value: 'feat', name: 'feat: ✨ A new feature', emoji: ':sparkles:' }, | ||
{ value: 'fix', name: 'fix: 🐛 A bug fix', emoji: ':bug:' }, | ||
{ value: 'docs', name: 'docs: 📝 Documentation only changes', emoji: ':memo:' }, | ||
{ | ||
value: 'style', | ||
name: 'style: 💄 Changes that do not affect the meaning of the code', | ||
emoji: ':lipstick:', | ||
}, | ||
{ | ||
value: 'refactor', | ||
name: 'refactor: ♻️ A code change that neither fixes a bug nor adds a feature', | ||
emoji: ':recycle:', | ||
}, | ||
{ | ||
value: 'perf', | ||
name: 'perf: ⚡️ A code change that improves performance', | ||
emoji: ':zap:', | ||
}, | ||
{ | ||
value: 'test', | ||
name: 'test: ✅ Adding missing tests or correcting existing tests', | ||
emoji: ':white_check_mark:', | ||
}, | ||
{ | ||
value: 'build', | ||
name: 'build: 📦️ Changes that affect the build system or external dependencies', | ||
emoji: ':package:', | ||
}, | ||
{ | ||
value: 'ci', | ||
name: 'ci: 🎡 Changes to our CI configuration files and scripts', | ||
emoji: ':ferris_wheel:', | ||
}, | ||
{ | ||
value: 'chore', | ||
name: "chore: 🔨 Other changes that don't modify src or test files", | ||
emoji: ':hammer:', | ||
}, | ||
{ value: 'revert', name: 'revert: ⏪️ Reverts a previous commit', emoji: ':rewind:' }, | ||
], | ||
scopes: [...packages, ...samples, ...e2e], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": [["@nx/js/babel", { "useBuiltIns": "entry" }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.