-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #325 from ottofeller/husky-hooks-file-structure
PLA-245 Change file structure for husky hooks
- Loading branch information
Showing
8 changed files
with
54 additions
and
50 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface CheckCargoOptions { | ||
/** | ||
* Perform a code formatting step | ||
* | ||
* @default true | ||
*/ | ||
readonly isFormatting?: boolean | ||
|
||
/** | ||
* Path to the cargo | ||
* | ||
* @default '.' | ||
*/ | ||
readonly workingDirectory?: string | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type {CheckCargoOptions} from './check-cargo-options' | ||
|
||
export interface HuskyRule { | ||
/** | ||
* Include pre-commit hook with `cargo check` command. | ||
* | ||
* @default undefined | ||
*/ | ||
readonly checkCargo?: CheckCargoOptions | ||
|
||
/** | ||
* Include commit message hook. | ||
* | ||
* @default true | ||
*/ | ||
readonly commitMsg?: boolean | ||
} |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './add-husky' | ||
export * from './with-git-hooks' | ||
export * from './check-cargo-options' | ||
export * from './husky-rule' |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './gitignore' | ||
export * from './husky' | ||
export * from './with-git-hooks' |
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,17 @@ | ||
import type {HuskyRule} from './husky' | ||
|
||
export interface WithGitHooks { | ||
/** | ||
* Include husky for git hook management. | ||
* | ||
* @default false | ||
*/ | ||
readonly hasGitHooks?: boolean | ||
|
||
/** | ||
* Include a default git hook that checks commit message. | ||
* | ||
* @default { commitMsg: true } | ||
*/ | ||
readonly huskyRules?: HuskyRule | ||
} |