Skip to content

Commit

Permalink
chore: use lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Aug 4, 2023
1 parent ae451ce commit fff2096
Show file tree
Hide file tree
Showing 4 changed files with 212 additions and 94 deletions.
6 changes: 3 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
pnpm commitlint --edit "${1}"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm pretty-quick --staged
pnpm lint-staged
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
"update:latest": "pnpm update -r --latest",
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run format"
},
"lint-staged": {
"*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}": [
"prettier --ignore-unknown --write"
],
"*.{json,yml,yaml,css,scss,sass,less,md,mdx}": [
"prettier --ignore-unknown --write"
]
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
Expand All @@ -37,8 +45,8 @@
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"prettier": "^3.0.1",
"pretty-quick": "^3.1.3",
"sort-package-json": "^2.5.1",
"turbo": "^1.10.12",
"typescript": "^5.1.6"
Expand Down
Loading

0 comments on commit fff2096

Please sign in to comment.