-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[H-0003] [devx] Setup pre-commit and pre-push hooks (#9)
* [H-0003] Installed Husky for pre-commit hooks * [H-0003] Minor improvements to the code * [H-0003] Update version Co-authored-by: Kovalenkov Pavel <p.kovalenkov@cian.ru>
- Loading branch information
1 parent
abdfc30
commit 7f9b615
Showing
14 changed files
with
85 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run precommit |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,5 @@ | ||
export * from "./removeDeepByKey"; | ||
export * from "./removeByKey"; | ||
export { removeDeepByKey } from "./removeDeepByKey"; | ||
export type { IRemoveDeepByKey } from "./removeDeepByKey"; | ||
|
||
export { removeByKey } from "./removeByKey"; | ||
export type { IRemoveByKey } from "./removeByKey"; |
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
export function deleteSingleKeyInObject<T extends Record<string, unknown>, K extends keyof T>( | ||
function deleteSingleKeyInObject<T extends Record<string, unknown>, K extends keyof T>( | ||
key: K, | ||
target: T, | ||
): Omit<T, K> { | ||
const { [key]: _, ...rest } = target; | ||
|
||
return rest; | ||
} | ||
|
||
export { deleteSingleKeyInObject }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export * from "./keyOf"; | ||
export * from "./valueOf"; | ||
export * from "./objectKeys"; | ||
export * from "./objectValues"; | ||
export type { KeyOf } from "./keyOf"; | ||
export type { ValueOf } from "./valueOf"; | ||
export { objectKeys } from "./objectKeys"; | ||
export { objectValues } from "./objectValues"; |
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,5 +1,7 @@ | ||
import { KeyOf } from "./keyOf"; | ||
|
||
export const objectKeys = <T extends Record<string, unknown>>(target: T) => { | ||
const objectKeys = <T extends Record<string, unknown>>(target: T) => { | ||
return Object.keys(target) as KeyOf<T>[]; | ||
}; | ||
|
||
export { objectKeys }; |
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,5 +1,7 @@ | ||
import { ValueOf } from "./valueOf"; | ||
|
||
export const objectValues = <T extends Record<string, unknown>>(target: T) => { | ||
const objectValues = <T extends Record<string, unknown>>(target: T) => { | ||
return Object.values(target) as ValueOf<T>[]; | ||
}; | ||
|
||
export { objectValues }; |