Skip to content

Commit

Permalink
feat: set up pre-commit on ui
Browse files Browse the repository at this point in the history
  • Loading branch information
2wheeh committed Oct 12, 2023
1 parent 4d918b6 commit 2dc8921
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ui/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd ui && yarn lint-staged
19 changes: 17 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,23 @@
"test:all": "yarn workspaces foreach --all run test",
"lint:all": "yarn workspaces foreach --all run lint",
"format:check": "prettier --config .prettierrc 'packages/**/*.{js,jsx,mjs,cjs,ts,tsx}' '**/package.json' '**/tsconfig.json' '**/tsconfig.**.json' --check",
"format:fix": "prettier --config .prettierrc 'packages/**/*.{js,jsx,mjs,cjs,ts,tsx}' '**/package.json' '**/tsconfig.json' '**/tsconfig.**.json' --write"

"format:fix": "prettier --config .prettierrc 'packages/**/*.{js,jsx,mjs,cjs,ts,tsx}' '**/package.json' '**/tsconfig.json' '**/tsconfig.**.json' --write",
"postinstall": "cd .. && husky install ui/.husky"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,cjs,mjs}": [
"eslint",
"prettier --write"
],
"**/package.json": [
"prettier --write"
],
"**/tsconfig.json": [
"prettier --write"
],
"**/tsconfig.**.json": [
"prettier --write"
]
},
"devDependencies": {
"husky": "^8.0.0",
Expand Down

0 comments on commit 2dc8921

Please sign in to comment.