Skip to content

Commit

Permalink
chore: Extract simple-git-hooks & lint-staged configs
Browse files Browse the repository at this point in the history
  • Loading branch information
wottpal committed Oct 13, 2023
1 parent 94426ef commit 014efcb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,jsx,ts,tsx}": ["pnpm run lint:fix"],
"*.{json,md,mdx,html,css,yml,yaml}": ["pnpm run lint:format"]
}
8 changes: 8 additions & 0 deletions .simple-git-hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
'pre-commit': `
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
pnpm lint-staged
`,
}
11 changes: 0 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@
"lint:fix": "pnpm run --filter frontend lint:fix",
"lint:format": "pnpm run --filter frontend lint:format"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"pnpm run lint:fix"
],
"*.{json,md,mdx,html,css,yml,yaml}": [
"pnpm run lint:format"
]
},
"simple-git-hooks": {
"pre-commit": "export NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\"\npnpm lint-staged"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
Expand Down

0 comments on commit 014efcb

Please sign in to comment.