-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 add git-cz + husky + commitlint
add git-cz + husky + commitlint
- Loading branch information
Showing
11 changed files
with
1,381 additions
and
10 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 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: {}, | ||
} |
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 @@ | ||
{ | ||
"path": "git-cz" | ||
} |
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,10 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# npm test | ||
# npx --no-install commitlint --edit "$1" | ||
npx commitlint --edit "${1}" | ||
|
||
# npx husky add .husky/commit-msg "npx --no-install commitlint -e $HUSKY_GIT_PARAMS" | ||
|
||
# npx --no-install commitlint -e $HUSKY_GIT_PARAMS |
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 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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 @@ | ||
{ | ||
"./**/*.{ts,js,tsx,jsx,vue}": [ | ||
"eslint --fix", | ||
"git add ." | ||
] | ||
} |
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,70 @@ | ||
module.exports = { | ||
disableEmoji: false, | ||
format: '{type}{scope}: {emoji}{subject}', | ||
list: [ 'test', 'feat', 'fix', 'chore', 'docs', 'refactor', 'style', 'ci', 'perf' ], | ||
maxMessageLength: 64, | ||
minMessageLength: 3, | ||
questions: [ 'type', 'scope', 'subject', 'body', 'breaking', 'issues', 'lerna' ], | ||
scopes: [], | ||
types: { | ||
chore: { | ||
description: 'Build process or auxiliary tool changes', | ||
emoji: '🤖', | ||
value: 'chore', | ||
}, | ||
ci: { | ||
description: 'CI related changes', | ||
emoji: '🎡', | ||
value: 'ci', | ||
}, | ||
docs: { | ||
description: 'Documentation only changes', | ||
emoji: '✏️', | ||
value: 'docs', | ||
}, | ||
feat: { | ||
description: 'A new feature', | ||
emoji: '🎸', | ||
value: 'feat', | ||
}, | ||
fix: { | ||
description: 'A bug fix', | ||
emoji: '🐛', | ||
value: 'fix', | ||
}, | ||
perf: { | ||
description: 'A code change that improves performance', | ||
emoji: '⚡️', | ||
value: 'perf', | ||
}, | ||
refactor: { | ||
description: 'A code change that neither fixes a bug or adds a feature', | ||
emoji: '💡', | ||
value: 'refactor', | ||
}, | ||
release: { | ||
description: 'Create a release commit', | ||
emoji: '🏹', | ||
value: 'release', | ||
}, | ||
style: { | ||
description: 'Markup, white-space, formatting, missing semi-colons...', | ||
emoji: '💄', | ||
value: 'style', | ||
}, | ||
test: { | ||
description: 'Adding missing tests', | ||
emoji: '💍', | ||
value: 'test', | ||
}, | ||
messages: { | ||
type: 'Select the type of change that you\'re committing:', | ||
customScope: 'Select the scope this component affects:', | ||
subject: 'Write a short, imperative mood description of the change:\n', | ||
body: 'Provide a longer description of the change:\n ', | ||
breaking: 'List any breaking changes:\n', | ||
footer: 'Issues this commit closes, e.g #123:', | ||
confirmCommit: 'The packages that this commit has affected\n', | ||
}, | ||
}, | ||
}; |
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,7 +1,7 @@ | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()] | ||
}) | ||
plugins: [ react() ], | ||
}); |
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.