Skip to content

Commit

Permalink
chore: husky git hooks setup
Browse files Browse the repository at this point in the history
  • Loading branch information
vithalreddy committed Mar 30, 2023
1 parent 36ccb5f commit 08befbe
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .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"

npm run lint:fix
16 changes: 16 additions & 0 deletions package-lock.json

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

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"data-import": "ts-node -T scripts/import-users-data.ts",
"gen-openapi": "sls openapi generate -f json -a 3.0.3 -o docs/openapi.json -p docs/postman.json",
"lint": "tsc --noEmit && eslint src/**/*.ts --cache --max-warnings=0",
"lint:fix": "eslint src/**/*.ts --fix",
"test": "echo \"Error: no test specified\" && exit 1"
"lint:fix": "tsc --noEmit && eslint src/**/*.ts --fix",
"test": "echo \"Error: no test specified\" && exit 1",
"prepare": "husky install"
},
"keywords": [
"serverless",
Expand Down Expand Up @@ -40,7 +41,8 @@
"serverless-offline": "^12.0.4",
"serverless-openapi-documenter": "^0.0.48",
"ts-node": "^10.9.1",
"typescript": "^5.0.2"
"typescript": "^5.0.2",
"husky": "^8.0.0"
},
"dependencies": {
"@aws-sdk/credential-providers": "^3.301.0",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"allowJs": true,
"skipLibCheck": true,
"importHelpers": true,
"alwaysStrict": true,
"sourceMap": true,
Expand Down

0 comments on commit 08befbe

Please sign in to comment.