Skip to content

Commit

Permalink
attempted to add husky for pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
gautvm committed May 15, 2023
1 parent d41af3a commit 6188d63
Show file tree
Hide file tree
Showing 4 changed files with 988 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && yarn semantic-commit"
}
}
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "next lint && prettier --write .",
"generate": "prisma generate",
"push": "prisma db push",
"studio": "prisma studio"
"studio": "prisma studio",
"semantic-commit": "commitlint -E HUSKY_GIT_PARAMS"
},
"dependencies": {
"@headlessui/react": "^1.7.14",
Expand Down Expand Up @@ -42,6 +43,20 @@
"use-debounce": "^9.0.4"
},
"devDependencies": {
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"husky": "^8.0.3",
"prettier": "^2.8.8"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"yarn lint",
"git add"
]
}
}
Loading

1 comment on commit 6188d63

@vercel
Copy link

@vercel vercel bot commented on 6188d63 May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

machine – ./

scoutmachine.vercel.app
machine-git-main-6070.vercel.app
machine-6070.vercel.app
machine.frc6070.ca

Please sign in to comment.