This repository was archived by the owner on Mar 4, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 427
feat: add support for husky v6 #765
Closed
vinayakkulkarni
wants to merge
6
commits into
nuxt:master
from
vinayakkulkarni:feat/add-support-for-husky-v6
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
90ffbb7
chore: remove husky from `package.json`
vinayakkulkarni 22882af
feat(deps): bump husky to v6 🥳
vinayakkulkarni bf963e1
feat: husky v6 files
vinayakkulkarni 09a7b31
chore: update template to support husky
vinayakkulkarni 57a3fa3
test: update snapshots
vinayakkulkarni 3aa5873
chore: use pmRun instead of `npm` & remove `console.log()`
vinayakkulkarni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/cna-template/template/frameworks/husky/.husky/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
4 changes: 4 additions & 0 deletions
4
packages/cna-template/template/frameworks/husky/.husky/commit-msg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
<%= pmRun %> commitlint --edit $1 |
5 changes: 5 additions & 0 deletions
5
packages/cna-template/template/frameworks/husky/.husky/pre-commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
<%= pmRun %> lint:js | ||
<%= pmRun %> lint:style |
5 changes: 5 additions & 0 deletions
5
packages/cna-template/template/frameworks/husky/.husky/pre-push
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
<%= pmRun %> lint:js | ||
<%= pmRun %> lint:style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+15 Bytes
(100%)
packages/create-nuxt-app/test/snapshots/index.test.js.snap
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure if this is a good idea as actually we’re using husky only for lint in git but not provide any other special hooks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use git-notify internally at GeoSpoc, and I thought adding husky as a devtool choice would provide devs with much more flexibility than just using husky for performing lint or test checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally leave it upto you & the Nuxt team to decide on the approach, I'm just happy I get to contribute :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think create-nuxt-app is more a nuxt template generater instead of generic application solution, so it makes sense to use lint-stage and husky to run vue and nuxt lint rules. And having hubsky as separeted may have some confilcts like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielroe What do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clarkdo I tend to agree with you. Anyway, it's a separate question from upgrading Husky to v6. Maybe merge #765 and then make this PR about reconsidering role of Husky?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielroe We could, but current pr is adding husky as a new selection
Git Hooks (via husky)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant merge the previous PR #715 and then make this one about reconsidering the role of Husky. Your call though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vinayakkulkarni Original pr has been merged, can you please update the pr add title ?