Skip to content

Commit

Permalink
chore: update config (#279)
Browse files Browse the repository at this point in the history
* chore: update lint-staged config

re #278

* chore: use czg instead of cz + cz-git

re #278

* chore: use cat instead of vim editor to write commits

re #278
  • Loading branch information
vplasencia committed May 2, 2024
1 parent df57ac2 commit 1861056
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 516 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"

npx lint-staged
2 changes: 1 addition & 1 deletion .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
. "$(dirname -- "$0")/_/husky.sh"

if [ "$NO_HOOK" != "1" ]; then
exec < /dev/tty && yarn cz --hook || true
exec < /dev/tty && npx czg --hook || true
fi
4 changes: 2 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"**/*.{js,ts}": "eslint --fix",
"*": ["prettier --write"]
"**/*.{js,ts,jsx,tsx,md,json,sol}": "prettier --write",
"**/*.{js,ts,jsx,tsx}": "eslint"
}
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"docs": "typedoc --cname zkkit.pse.dev --githubPages true",
"remove:stable-version-field": "ts-node scripts/remove-stable-version-field.ts ${0} && yarn format:prettier:write",
"precommit": "lint-staged",
"postinstall": "husky install",
"postinstall": "husky && git config --local core.editor cat",
"style": "turbo lint:eslint lint format:prettier"
},
"keywords": [
Expand All @@ -57,8 +57,7 @@
"@typescript-eslint/parser": "^7.0.2",
"benny": "^3.7.1",
"changelogithub": "patch:changelogithub@npm%3A0.13.3#~/.yarn/patches/changelogithub-npm-0.13.3-1783949906.patch",
"commitizen": "^4.3.0",
"cz-git": "^1.9.0",
"czg": "^1.9.1",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
Expand All @@ -77,10 +76,5 @@
"turbo": "^1.13.2",
"typedoc": "^0.25.8",
"typescript": "^5.3.3"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-git"
}
}
}

0 comments on commit 1861056

Please sign in to comment.