🔀 chore(CommandsEnum.ts): reorder COMMANDS enum values

🐛 fix(config.ts): add missing new lines
🐛 fix(githook.ts): capitalize OpenCommit and fix grammar
The COMMANDS enum values were reordered to improve readability and consistency. In config.ts, missing new lines were added to improve code readability. In githook.ts, OpenCommit was capitalized and grammar was fixed to improve clarity.
This commit is contained in:
di-sukharev
2023-03-28 11:31:42 +08:00
parent 1c113c2901
commit a2d03e054c
4 changed files with 11 additions and 7 deletions
+4
View File
@@ -29,6 +29,7 @@ const validateConfig = (
outro(
`${chalk.red('✖')} Unsupported config key ${key}: ${validationMessage}`
);
process.exit(1);
}
};
@@ -49,6 +50,7 @@ export const configValidators = {
return value;
},
[CONFIG_KEYS.description](value: any) {
validateConfig(
CONFIG_KEYS.description,
@@ -58,6 +60,7 @@ export const configValidators = {
return value;
},
[CONFIG_KEYS.emoji](value: any) {
validateConfig(
CONFIG_KEYS.emoji,
@@ -67,6 +70,7 @@ export const configValidators = {
return value;
},
[CONFIG_KEYS.language](value: any) {
validateConfig(
CONFIG_KEYS.language,
+3 -3
View File
@@ -55,18 +55,18 @@ export const hookCommand = command(
}
if (mode === 'unset') {
intro(`unsetting opencommit as '${HOOK_NAME}' hook`);
intro(`unsetting OpenCommit as '${HOOK_NAME}' hook`);
if (!isHookExists) {
return outro(
`opencommit wasn't previously set as '${HOOK_NAME}' hook, nothing to remove`
`OpenCommit wasn't previously set as '${HOOK_NAME}' hook, nothing to remove`
);
}
const realpath = await fs.realpath(SYMLINK_URL);
if (realpath !== HOOK_URL) {
return outro(
`opencommit wasn't previously set as '${HOOK_NAME}' hook, but different hook was, if you want to remove it — do it manually`
`OpenCommit wasn't previously set as '${HOOK_NAME}' hook, but different hook was, if you want to remove it — do it manually`
);
}