replaced eslint:recommended with prettier

This commit is contained in:
Wyatt Johnson
2018-01-11 20:00:34 -07:00
parent d56c19016a
commit 0abc2ca243
649 changed files with 16235 additions and 13008 deletions
+11 -15
View File
@@ -11,13 +11,10 @@ const mongoose = require('../services/mongoose');
const MigrationService = require('../services/migration');
// Register shutdown hooks.
util.onshutdown([
() => mongoose.disconnect()
]);
util.onshutdown([() => mongoose.disconnect()]);
async function createMigration(name) {
try {
// Create the migration.
await MigrationService.create(name);
@@ -29,20 +26,20 @@ async function createMigration(name) {
}
async function runMigrations() {
try {
let {backedUp} = await inquirer.prompt([
let { backedUp } = await inquirer.prompt([
{
type: 'confirm',
name: 'backedUp',
message: 'Did you perform a database backup',
default: false
}
default: false,
},
]);
if (!backedUp) {
throw new Error('Please backup your databases prior to migrations occuring');
throw new Error(
'Please backup your databases prior to migrations occuring'
);
}
// Get the migrations to run.
@@ -50,21 +47,20 @@ async function runMigrations() {
console.log('Now going to run the following migrations:\n');
for (let {filename} of migrations) {
for (let { filename } of migrations) {
console.log(`\tmigrations/${filename}`);
}
let {confirm} = await inquirer.prompt([
let { confirm } = await inquirer.prompt([
{
type: 'confirm',
name: 'confirm',
message: 'Proceed with migrations',
default: false
}
default: false,
},
]);
if (confirm) {
// Run the migrations.
await MigrationService.run(migrations);
} else {