Skip to content

Commit

Permalink
lefthookとprettierを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
o-tr committed Oct 20, 2024
1 parent 5499ac7 commit 08fa8b2
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 3 deletions.
12 changes: 12 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#

pre-commit:
parallel: true
commands:
prettier:
glob: "**/*.md"
run: npx prettier --write {staged_files}
183 changes: 182 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
"write-heading-ids": "docusaurus write-heading-ids",
"prepare": "lefthook install&&git config core.quotepath false"
},
"dependencies": {
"@docusaurus/core": "3.4.0",
Expand All @@ -24,7 +25,9 @@
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.4.0",
"@docusaurus/types": "3.4.0"
"@docusaurus/types": "3.4.0",
"lefthook": "^1.7.22",
"prettier": "^3.3.3"
},
"browserslist": {
"production": [
Expand Down

0 comments on commit 08fa8b2

Please sign in to comment.