Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f4c4be

Browse files
authored
Merge pull request #28 from drivecore/add-lint-to-precommit
Add linting to pre-commit hook
2 parents 8514966 + e9eba89 commit 3f4c4be

File tree

3 files changed

+288
-2
lines changed

3 files changed

+288
-2
lines changed

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
. "$(dirname -- "$0")/_/husky.sh"
33

44
echo "Running pre-commit checks..."
5-
npm run pre-commit-check
5+
pnpm pre-commit-check

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "mycoder-docs",
33
"version": "0.0.0",
44
"private": true,
5+
"packageManager": "[email protected]",
56
"scripts": {
67
"docusaurus": "docusaurus",
78
"start": "docusaurus start",
@@ -15,7 +16,7 @@
1516
"typecheck": "tsc",
1617
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
1718
"prepare": "husky",
18-
"pre-commit-check": "npm run build"
19+
"pre-commit-check": "pnpm lint && pnpm build"
1920
},
2021
"dependencies": {
2122
"@docusaurus/core": "3.7.0",

0 commit comments

Comments
 (0)