Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support husky v6 #1009

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/templates/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const basicTemplate: Template = {
build: 'tsdx build',
test: 'tsdx test',
lint: 'tsdx lint',
prepare: 'tsdx build',
prepare: 'husky install && tsdx build',
size: 'size-limit',
analyze: 'size-limit --why',
},
Expand All @@ -44,11 +44,6 @@ const basicTemplate: Template = {
},
],
*/
husky: {
hooks: {
'pre-commit': 'tsdx lint',
},
},
prettier: {
printWidth: 80,
semi: true,
Expand Down
1 change: 1 addition & 0 deletions templates/basic/.husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions templates/basic/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install tsdx lint
1 change: 1 addition & 0 deletions templates/react-with-storybook/.husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions templates/react-with-storybook/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install tsdx lint
1 change: 1 addition & 0 deletions templates/react/.husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions templates/react/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install tsdx lint