Skip to content

Commit

Permalink
chore: add lint-staged with git hook
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Mar 29, 2024
1 parent c6eb3cc commit b2d338b
Show file tree
Hide file tree
Showing 3 changed files with 267 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
npx --no-install lint-staged
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"espree": "^9.6.1",
"esquery": "^1.5.0",
"json-schema": "^0.4.0",
"lint-staged": "^15.0.0",
"mocha": "^10.2.0",
"monaco-editor": "^0.47.0",
"nyc": "^15.1.0",
Expand All @@ -119,5 +120,18 @@
},
"publishConfig": {
"access": "public"
},
"lint-staged": {
"*.{json,md,yml}": [
"prettier --write"
],
"*.{js?(x)}": [
"prettier --write",
"eslint --fix"
],
"*.ts?(x)": [
"prettier --parser=typescript --write",
"eslint --fix"
]
}
}
Loading

0 comments on commit b2d338b

Please sign in to comment.