From 4049964d2305dd613276b8215daa7863ce0b5cc7 Mon Sep 17 00:00:00 2001 From: tycrek Date: Wed, 25 Aug 2021 20:28:29 -0600 Subject: [PATCH] Fixed variable used before definition (JS-0129) --- setup.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/setup.js b/setup.js index 442aeb4..69c9849 100755 --- a/setup.js +++ b/setup.js @@ -33,6 +33,21 @@ const oldConfig = { saveAsOriginal: false, // Prone to conflicts, which ass doesn't handle }; +function getConfirmSchema(description) { + return { + properties: { + confirm: { + description, + type: 'string', + pattern: /^[y|n]/gim, + message: 'Must respond with either \'y\' or \'n\'', + required: true, + before: (value) => value.toLowerCase().startsWith('y') + } + } + }; +} + // If directly called on the command line, run setup script function doSetup() { const path = (...paths) => require('path').join(__dirname, ...paths); @@ -230,21 +245,6 @@ function doSetup() { .catch((err) => log.blank().error(err)); } -function getConfirmSchema(description) { - return { - properties: { - confirm: { - description, - type: 'string', - pattern: /^[y|n]/gim, - message: 'Must respond with either \'y\' or \'n\'', - required: true, - before: (value) => value.toLowerCase().startsWith('y') - } - } - }; -} - module.exports = { doSetup, config