Skip to content

Commit

Permalink
Added pre-commit hooks
Browse files Browse the repository at this point in the history
Description: pre-commit hooks added using husky and lint-staged is used which will run on every commit
  • Loading branch information
AvdhutPailwan committed May 14, 2024
1 parent 6c772c0 commit 5914c8f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
19 changes: 18 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,22 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint . --ext .js,.jsx",
"lint:fix": "eslint . --cache --quiet --fix --ext .js,.jsx"
"lint:fix": "eslint . --cache --quiet --fix --ext .js,.jsx",
"prepare": "husky"
},
"lint-staged": {
"./**/*.js": [
"eslint --fix"
],
"./**/*.jsx": [
"eslint --fix"
],
"./**/*.ts": [
"eslint --fix"
],
"./**/*.tsx": [
"eslint --fix"
]
},
"eslintConfig": {
"extends": [
Expand All @@ -66,6 +81,8 @@
"@babel/plugin-transform-private-property-in-object": "^7.24.5",
"@babel/preset-react": "^7.24.1",
"eslint-plugin-react": "^7.34.1",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "3.0.1"
},
"description": "<img src=\"./Images/WebsiteImg.png\">",
Expand Down

0 comments on commit 5914c8f

Please sign in to comment.