Skip to content

Commit

Permalink
style: changed import sort order pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
barthofu committed Feb 9, 2024
1 parent 0a18700 commit 36114d8
Show file tree
Hide file tree
Showing 20 changed files with 3 additions and 26 deletions.
10 changes: 3 additions & 7 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,12 @@ module.exports = antfu(
['^node:'],
// Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
['^@\\w'],
['^@?\\w'],
// Internal packages.
// Things that start with `@/`.
['^@/\\w'],
// Other imports
['^\\w'],
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
['^'],
// Relative imports.
// Anything that starts with a dot.
['^\\.'],
// TypeScript import assignments.
['^\\u0001', '^\\u0002'],
],
Expand Down
1 change: 0 additions & 1 deletion src/api/controllers/bot.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { BodyParams, Controller, Delete, Get, PathParams, Post, UseBefore } from '@tsed/common'
import { NotFound, Unauthorized } from '@tsed/exceptions'
import { Required } from '@tsed/schema'

import { BaseGuildTextChannel, BaseGuildVoiceChannel, ChannelType, NewsChannel, PermissionsBitField } from 'discord.js'
import { Client, MetadataStorage } from 'discordx'

Expand Down
1 change: 0 additions & 1 deletion src/api/controllers/database.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { BodyParams, Controller, Get, Post, UseBefore } from '@tsed/common'
import { InternalServerError } from '@tsed/exceptions'
import { Required } from '@tsed/schema'

import { injectable } from 'tsyringe'

import { DevAuthenticated } from '@/api/middlewares'
Expand Down
1 change: 0 additions & 1 deletion src/api/controllers/health.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Controller, Get, UseBefore } from '@tsed/common'

import { Client } from 'discordx'

import { Data } from '@/entities'
Expand Down
1 change: 0 additions & 1 deletion src/api/middlewares/botOnline.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Middleware } from '@tsed/common'
import { InternalServerError } from '@tsed/exceptions'

import { Client } from 'discordx'

import { resolveDependencies } from '@/utils/functions'
Expand Down
1 change: 0 additions & 1 deletion src/api/middlewares/devAuthenticated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import process from 'node:process'

import { Context, Middleware, PlatformContext } from '@tsed/common'
import { BadRequest, Unauthorized } from '@tsed/exceptions'

import DiscordOauth2 from 'discord-oauth2'

import { Store } from '@/services'
Expand Down
1 change: 0 additions & 1 deletion src/api/middlewares/log.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Context, Middleware, PlatformContext } from '@tsed/common'

import chalk from 'chalk'

import { Logger } from '@/services'
Expand Down
1 change: 0 additions & 1 deletion src/api/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import process from 'node:process'
import { MikroORM, UseRequestContext } from '@mikro-orm/core'
import { Inject, PlatformAcceptMimesMiddleware, PlatformApplication } from '@tsed/common'
import { PlatformExpress } from '@tsed/platform-express'

import bodyParser from 'body-parser'
import { singleton } from 'tsyringe'

Expand Down
1 change: 0 additions & 1 deletion src/commands/Admin/prefix.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Category } from '@discordx/utilities'

import { ApplicationCommandOptionType, CommandInteraction } from 'discord.js'
import { Client } from 'discordx'
import { injectable } from 'tsyringe'
Expand Down
1 change: 0 additions & 1 deletion src/commands/General/help.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Category } from '@discordx/utilities'

import { ActionRowBuilder, APISelectMenuOption, CommandInteraction, EmbedBuilder, StringSelectMenuBuilder, StringSelectMenuInteraction } from 'discord.js'
import { Client, MetadataStorage, SelectMenuComponent } from 'discordx'
import { TranslationFunctions } from 'src/i18n/i18n-types'
Expand Down
1 change: 0 additions & 1 deletion src/commands/General/info.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Category } from '@discordx/utilities'

import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, CommandInteraction, EmbedBuilder, EmbedField } from 'discord.js'
Expand Down
1 change: 0 additions & 1 deletion src/commands/General/invite.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Category } from '@discordx/utilities'

import { CommandInteraction, EmbedBuilder } from 'discord.js'
import { Client } from 'discordx'

Expand Down
1 change: 0 additions & 1 deletion src/commands/General/ping.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Category } from '@discordx/utilities'

import { CommandInteraction, Message } from 'discord.js'
import { Client } from 'discordx'

Expand Down
1 change: 0 additions & 1 deletion src/commands/General/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
PaginationType,
} from '@discordx/pagination'
import { Category } from '@discordx/utilities'

import { ApplicationCommandOptionType, CommandInteraction, EmbedBuilder, User } from 'discord.js'
import { Client } from 'discordx'
import { injectable } from 'tsyringe'
Expand Down
1 change: 0 additions & 1 deletion src/guards/requestContextIsolator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { RequestContext } from '@mikro-orm/core'

import { GuardFunction } from 'discordx'

import { Database } from '@/services'
Expand Down
1 change: 0 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import process from 'node:process'

import { resolve } from '@discordx/importer'
import { RequestContext } from '@mikro-orm/core'

import chalk from 'chalk'
import chokidar from 'chokidar'
import discordLogs from 'discord-logs'
Expand Down
1 change: 0 additions & 1 deletion src/services/Database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import fs from 'node:fs'
import process from 'node:process'

import { EntityName, MikroORM, Options } from '@mikro-orm/core'

import fastFolderSizeSync from 'fast-folder-size/sync'
import { backup, restore } from 'saveqlite'
import { delay, inject, singleton } from 'tsyringe'
Expand Down
1 change: 0 additions & 1 deletion src/services/PluginsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { sep } from 'node:path'

import { resolve } from '@discordx/importer'
import { AnyEntity, EntityClass } from '@mikro-orm/core'

import { singleton } from 'tsyringe'
import { BaseTranslation } from 'typesafe-i18n'
import { ImportLocaleMapping, storeTranslationsToDisk } from 'typesafe-i18n/importer'
Expand Down
1 change: 0 additions & 1 deletion src/services/Stats.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import process from 'node:process'

import { EntityRepository } from '@mikro-orm/core'

import { constant } from 'case'
import { Client, SimpleCommandMessage } from 'discordx'
import osu from 'node-os-utils'
Expand Down
1 change: 0 additions & 1 deletion src/utils/classes/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { sep } from 'node:path'

import { importx, resolve } from '@discordx/importer'
import { AnyEntity, EntityClass } from '@mikro-orm/core'

import semver from 'semver'
import { BaseTranslation } from 'typesafe-i18n'

Expand Down

0 comments on commit 36114d8

Please sign in to comment.