Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 04ee7ef

Browse files
committed
setup prettier
1 parent 9fcb497 commit 04ee7ef

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"serve": "docusaurus serve",
1313
"write-translations": "docusaurus write-translations",
1414
"write-heading-ids": "docusaurus write-heading-ids",
15-
"typecheck": "tsc"
15+
"typecheck": "tsc",
16+
"prepare": "husky install"
1617
},
1718
"dependencies": {
1819
"@docusaurus/core": "2.0.1",
@@ -26,6 +27,7 @@
2627
"devDependencies": {
2728
"@docusaurus/module-type-aliases": "2.0.1",
2829
"@tsconfig/docusaurus": "^1.0.5",
30+
"prettier": "^2.7.1",
2931
"typescript": "^4.7.4"
3032
},
3133
"browserslist": {
@@ -42,5 +44,8 @@
4244
},
4345
"engines": {
4446
"node": ">=16.14"
47+
},
48+
"lint-staged": {
49+
"*.{js,css,md}": "prettier --write"
4550
}
4651
}

pnpm-lock.yaml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)