From 3c90e764cd5c1e7610843177ee3916ed78b30895 Mon Sep 17 00:00:00 2001 From: Jerome Fitzgerald Date: Wed, 3 Mar 2021 22:47:43 -0500 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20alphasort,=20move=20?= =?UTF-8?q?up=20const?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/createState.js | 4 +++- lib/parseArgs.js | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/createState.js b/lib/createState.js index 4037e471..bbc35207 100644 --- a/lib/createState.js +++ b/lib/createState.js @@ -11,6 +11,8 @@ const createState = (config = {}) => { throw new Error('Could not find Git root folder.'); } + const configDefault = getConfig(root); + // @note any overrides should override the theme as base const configOverride = Boolean(config) && config.theme === 'gitmoji' @@ -28,7 +30,7 @@ const createState = (config = {}) => { type: '', }, config: { - ...getConfig(root), + ...configDefault, ...configOverride, }, root, diff --git a/lib/parseArgs.js b/lib/parseArgs.js index 409d76d3..ff918aa7 100644 --- a/lib/parseArgs.js +++ b/lib/parseArgs.js @@ -55,12 +55,12 @@ const parseArgs = () => { v: 'version', }, boolean: [ - 'version', - 'help', 'disable-emoji', - 'non-interactive', - 'hook', 'dry-run', + 'help', + 'hook', + 'non-interactive', + 'version', ], string: [ 'body',