Skip to content

Commit

Permalink
feat: add support for simple-git-hooks (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
daanvosdewael authored May 4, 2021
1 parent 9b76ec1 commit 0f1c956
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaultRules.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ _Note: when a specific key order is used, any other keys will be sorted in the e
| contributes | Key sort |
| activationEvents | Unique items |
| husky | Sorts the `hooks` field using [git hook sort](#git-hooks) |
| simple-git-hooks | Key sort using [git hook sort](#git-hooks) |
| pre-commit | |
| commitlint | Key sort |
| lint-staged | |
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ const fields = [
/* vscode */ { key: 'contributes', over: sortObject },
/* vscode */ { key: 'activationEvents', over: uniq },
{ key: 'husky', over: overProperty('hooks', sortGitHooks) },
{ key: 'simple-git-hooks', over: sortGitHooks },
{ key: 'pre-commit' },
{ key: 'commitlint', over: sortObject },
{ key: 'lint-staged' },
Expand Down
Binary file modified tests/snapshots/cli.js.snap
Binary file not shown.
2 changes: 2 additions & 0 deletions tests/snapshots/main.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Generated by [AVA](https://avajs.dev).
"resolutions": "resolutions",␊
"scripts": "scripts",␊
"sideEffects": "sideEffects",␊
"simple-git-hooks": "simple-git-hooks",␊
"source": "source",␊
"style": "style",␊
"stylelint": "stylelint",␊
Expand Down Expand Up @@ -153,6 +154,7 @@ Generated by [AVA](https://avajs.dev).
"contributes": "contributes",␊
"activationEvents": "activationEvents",␊
"husky": "husky",␊
"simple-git-hooks": "simple-git-hooks",␊
"pre-commit": "pre-commit",␊
"commitlint": "commitlint",␊
"lint-staged": "lint-staged",␊
Expand Down
Binary file modified tests/snapshots/main.js.snap
Binary file not shown.

0 comments on commit 0f1c956

Please sign in to comment.