From dc2d32670b54e153a3c67816c39c3965e0c33e5f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 23:52:55 +0100 Subject: [PATCH] clean up file Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/autocomplete/CommandProvider.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/autocomplete/CommandProvider.js b/src/autocomplete/CommandProvider.js index 7b97557ee0..fef0544b8a 100644 --- a/src/autocomplete/CommandProvider.js +++ b/src/autocomplete/CommandProvider.js @@ -45,10 +45,10 @@ const COMMANDS = [ command: '/ddg', args: '', description: 'Searches DuckDuckGo for results', - } + }, ]; -let COMMAND_RE = /(^\/\w*)/g; +const COMMAND_RE = /(^\/\w*)/g; let instance = null; @@ -62,9 +62,9 @@ export default class CommandProvider extends AutocompleteProvider { async getCompletions(query: string, selection: {start: number, end: number}) { let completions = []; - let {command, range} = this.getCurrentCommand(query, selection); + const {command, range} = this.getCurrentCommand(query, selection); if (command) { - completions = this.fuse.search(command[0]).map(result => { + completions = this.fuse.search(command[0]).map((result) => { return { completion: result.command + ' ', component: (