Skip to content

Commit

Permalink
chore: added pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jiteshy committed Nov 25, 2024
1 parent 97ba25a commit 6da1e42
Show file tree
Hide file tree
Showing 4 changed files with 331 additions and 14 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"new": "backstage-cli new --scope internal",
"backstage:bump": "backstage-cli versions:bump",
"bump-test": "yarn run standard-version --dry-run --no-verify --releaseCommitMessageFormat 'v{{currentTag}}'",
"bump": "yarn run standard-version --no-verify --releaseCommitMessageFormat 'v{{currentTag}}'"
"bump": "yarn run standard-version --no-verify --releaseCommitMessageFormat 'v{{currentTag}}'",
"postinstall": "husky install"
},
"workspaces": {
"packages": [
Expand All @@ -42,6 +43,7 @@
"concurrently": "^8.0.0",
"husky": "^9.1.7",
"lerna": "^7.3.0",
"lint-staged": ">=10",
"node-gyp": "^9.0.0",
"prettier": "^2.3.2",
"standard-version": "^9.5.0",
Expand All @@ -52,19 +54,15 @@
"@types/react-dom": "^18"
},
"prettier": "@spotify/prettier-config",
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx,mjs,cjs}": [
"eslint --fix",
"prettier --write"
],
"*.{json,md}": [
"prettier --write"
]
],
"*.{css,md}": "prettier --write"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 6da1e42

Please sign in to comment.