mirror of
https://github.com/wassname/talk.git
synced 2026-08-03 13:20:59 +08:00
replaced eslint:recommended with prettier
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
require('./util');
|
||||
const program = require('commander');
|
||||
const {head, map} = require('lodash');
|
||||
const { head, map } = require('lodash');
|
||||
const Matcher = require('did-you-mean');
|
||||
|
||||
program
|
||||
@@ -19,7 +19,10 @@ program
|
||||
.command('users', 'work with the application auth')
|
||||
.command('migration', 'provides utilities for migrating the database')
|
||||
.command('verify', 'provides utilities for performing data verification')
|
||||
.command('plugins', 'provides utilities for interacting with the plugin system')
|
||||
.command(
|
||||
'plugins',
|
||||
'provides utilities for interacting with the plugin system'
|
||||
)
|
||||
.parse(process.argv);
|
||||
|
||||
// If the command wasn't found, output help.
|
||||
@@ -29,9 +32,11 @@ if (!commands.includes(command)) {
|
||||
const m = new Matcher(commands);
|
||||
const similarCommands = m.list(command);
|
||||
|
||||
console.error(`cli '${command}' is not a talk cli command. See 'cli --help'.`);
|
||||
console.error(
|
||||
`cli '${command}' is not a talk cli command. See 'cli --help'.`
|
||||
);
|
||||
if (similarCommands.length > 0) {
|
||||
const sc = similarCommands.map(({value}) => `\t${value}\n`).join('');
|
||||
const sc = similarCommands.map(({ value }) => `\t${value}\n`).join('');
|
||||
console.error(`\nThe most similar commands are\n${sc}`);
|
||||
}
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user