Skip to content

Commit

Permalink
fix: husky error in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrani committed Feb 23, 2024
1 parent bcc1aee commit 2df6595
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0)
}

const husky = (await import('husky')).default
console.log(husky())
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"prepare": "husky"
"prepare": "node .husky/install.mjs"
},
"lint-staged": {
"*.{js,ts,svelte}": "eslint --fix --cache --cache-location ./node_modules/.cache/.eslintcache",
Expand Down

0 comments on commit 2df6595

Please sign in to comment.