From 5a7b05d040f7dbc9e74bfa3063acf70a0f7e8260 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 16 Oct 2019 01:34:13 +0100 Subject: [PATCH] Import export tidy --- .eslintrc.json | 3 ++- src/Client.ts | 10 ++++------ src/Util.ts | 4 ++-- src/class/Command.ts | 2 +- src/commands/lock.ts | 5 ++--- src/commands/modlogs.ts | 6 ++---- src/commands/ping.ts | 5 ++--- src/events/messageCreate.ts | 6 +++--- 8 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7169026..3a31097 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -35,6 +35,7 @@ "no-restricted-syntax": "off", "camelcase": "off", "indent": "warn", - "object-curly-newline": "off" + "object-curly-newline": "off", + "import/prefer-default-export": "off" } } \ No newline at end of file diff --git a/src/Client.ts b/src/Client.ts index 7cdf0ff..ee150cf 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -4,12 +4,10 @@ import Eris from 'eris'; import mongoose from 'mongoose'; import fs from 'fs-extra'; import path from 'path'; -import config from './config.json'; -import Account, { AccountInterface } from './models/Account'; -import Moderation, { ModerationInterface } from './models/Moderation'; -import emojis from './stores/emojis'; -import Util from './Util'; -import Command from './class/Command'; +import { config, Util } from '.'; +import { Account, AccountInterface, Moderation, ModerationInterface } from './models'; +import { emojis } from './stores'; +import { Command } from './class'; export default class Client extends Eris.Client { diff --git a/src/Util.ts b/src/Util.ts index a74fed3..9564405 100644 --- a/src/Util.ts +++ b/src/Util.ts @@ -2,8 +2,8 @@ import { promisify } from 'util'; import childProcess from 'child_process'; import nodemailer from 'nodemailer'; import { Message } from 'eris'; -import Client from './Client'; -import Command from './class/Command'; +import { Client } from '.'; +import { Command } from './class'; export default class Util { public client: Client; diff --git a/src/class/Command.ts b/src/class/Command.ts index 53bc647..16177ac 100644 --- a/src/class/Command.ts +++ b/src/class/Command.ts @@ -1,5 +1,5 @@ import { Message } from 'eris'; -import Client from '../Client'; +import { Client } from '..'; export default class Command { name: string diff --git a/src/commands/lock.ts b/src/commands/lock.ts index 051118a..eb50eb0 100644 --- a/src/commands/lock.ts +++ b/src/commands/lock.ts @@ -1,8 +1,7 @@ import fs from 'fs-extra'; import { Message } from 'eris'; -import Client from '../Client'; -import Command from '../class/Command'; -import Util from '../Util'; +import { Client, Util } from '..'; +import { Command } from '../class'; export default class Lock extends Command { util: Util = new Util(this.client) diff --git a/src/commands/modlogs.ts b/src/commands/modlogs.ts index af96f6f..2e8e3d9 100644 --- a/src/commands/modlogs.ts +++ b/src/commands/modlogs.ts @@ -1,9 +1,7 @@ import { Message } from 'eris'; import { createPaginationEmbed } from 'eris-pagination'; -import Client from '../Client'; -import Command from '../class/Command'; -import RichEmbed from '../class/RichEmbed'; -import Util from '../Util'; +import { Client, Util } from '..'; +import { Command, RichEmbed } from '../class'; export default class Modlogs extends Command { util: Util = new Util(this.client) diff --git a/src/commands/ping.ts b/src/commands/ping.ts index c6c1681..d8c939b 100644 --- a/src/commands/ping.ts +++ b/src/commands/ping.ts @@ -1,7 +1,6 @@ import { Message } from 'eris'; -import Client from '../Client'; -import Command from '../class/Command'; -import Util from '../Util'; +import { Client, Util } from '..'; +import { Command } from '../class'; export default class Ping extends Command { util: Util = new Util(this.client) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index 7bad7a5..1e86ba1 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -1,9 +1,9 @@ import { Message, TextChannel } from 'eris'; -import Client from '../Client'; -import { prefix } from '../config.json'; -import Util from '../Util'; +import { Client, config, Util } from '..'; import Command from '../class/Command'; +const { prefix } = config; + export default class { client: Client