Skip to content

Commit c057d2a

Browse files
committed
chore: 共享git hooks
1 parent ee7a007 commit c057d2a

File tree

15 files changed

+1739
-310
lines changed

15 files changed

+1739
-310
lines changed
File renamed without changes.

.github/workflows/vercel-nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- master
7+
paths:
8+
- "./client/**"
79
workflow_dispatch:
810

911
jobs:

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1"

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
pnpm lint-staged

.lintstagedrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"src/*.{json,less}": [
3+
"prettier --write --config ./.prettierrc.json"
4+
],
5+
"**/*.js": [
6+
"prettier --write --config ./.prettierrc.json"
7+
],
8+
"**/*.{ts,tsx}": [
9+
"eslint --fix",
10+
"prettier --write --config ./.prettierrc.json"
11+
]
12+
}

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://npmmirror.com/
2+
registry = https://registry.npmmirror.com

client/LICENSE renamed to LICENSE

File renamed without changes.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"repository": "https://github.com/msgbyte/tailchat.git",
1010
"author": "moonrailgun <[email protected]>",
11-
"license": "GPLv3",
11+
"license": "Apache-2.0",
1212
"private": true,
1313
"scripts": {
1414
"prepare": "husky install",
File renamed without changes.

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "tailchat",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"dev": "concurrently -k npm:dev:web npm:dev:server",
8+
"dev:web": "cd client/web && pnpm run dev",
9+
"dev:server": "cd server && pnpm run dev",
10+
"prepare": "husky install"
11+
},
12+
"keywords": [],
13+
"author": "moonrailgun <[email protected]>",
14+
"license": "Apache-2.0",
15+
"devDependencies": {
16+
"@commitlint/cli": "^17.0.3",
17+
"@commitlint/config-conventional": "^17.0.3",
18+
"commitlint": "^17.0.3",
19+
"concurrently": "^7.3.0",
20+
"husky": "^8.0.1",
21+
"lint-staged": "^13.0.3",
22+
"prettier": "^2.7.1"
23+
}
24+
}

0 commit comments

Comments
 (0)