Fixed variable used before definition (JS-0129)

pull/51/head
tycrek 3 years ago
parent 7c02205774
commit 4049964d23
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -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

Loading…
Cancel
Save