Skip to content

Commit

Permalink
[MNT] Added post-merge hook and updated scripts (#38)
Browse files Browse the repository at this point in the history
* Enhance the usability of users

* Enhance the change format:fix

* Added post-commit hook

* change the lintstagedrc value

* change the lintstagedrc value to check

* Create codeql.yml

* Create eslint.yml

* Delete .github/workflows/eslint.yml

* Delete .github/workflows/codeql.yml

* Added clean install of node modules

* remove unnecessary type check

* Remove unnecessary type check from package.json

* Added fromat check

* Remove frormat:fix
  • Loading branch information
Sauradip07 authored Mar 5, 2024
1 parent 184a871 commit 31de127
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

git diff HEAD^ HEAD --exit-code -- ./package.json || npm ci
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged

2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"*.{ts,tsx}": ["npm run lint", "npm run format"]
"*.{ts,tsx}": ["npm run lint:check", "npm run format:check"]
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives",
"lint:check": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings=0",
"lint:fix": "eslint --fix **/*.{ts,tsx}",
"preview": "vite preview",
"format": "prettier --write .",
"format:fix": "prettier --write .",
"format:check": "prettier --check .",
"prepare": "husky install"
},
"dependencies": {
Expand Down

0 comments on commit 31de127

Please sign in to comment.