chore: Migrate ESLint and prettier to Biome (#3634)

* Migrate eslint and prettier to biomejs

This does NOT include examples/bigbot as it has its own formatter

* Update to biome 1.8.0

* Readd dotenv dev dependency to rest

During a merge it got lost
This commit is contained in:
Fleny
2024-07-13 13:05:02 -05:00
committed by GitHub
parent 7b3bd76c82
commit 919474069d
132 changed files with 722 additions and 4993 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import { Collection, type ApplicationCommandOption, type ApplicationCommandTypes, type Interaction } from '@discordeno/bot'
import { type ApplicationCommandOption, type ApplicationCommandTypes, Collection, type Interaction } from '@discordeno/bot'
export const commands = new Collection<string, Command>()
@@ -1,4 +1,4 @@
import { ApplicationCommandOptionTypes, hasProperty, type Guild } from '@discordeno/bot'
import { ApplicationCommandOptionTypes, type Guild, hasProperty } from '@discordeno/bot'
import chalk from 'chalk'
import { bot } from '../bot.js'
import { commands } from '../commands.js'
+5 -5
View File
@@ -1,14 +1,14 @@
import { hasProperty, type Bot, type CreateApplicationCommand, type Guild } from '@discordeno/bot'
import { type Bot, type CreateApplicationCommand, type Guild, hasProperty } from '@discordeno/bot'
import { bot } from '../bot.js'
import { commands, type SubCommand, type SubCommandGroup } from '../commands.js'
import { type SubCommand, type SubCommandGroup, commands } from '../commands.js'
import { createLogger } from './logger.js'
const logger = createLogger({ name: 'Helpers' })
/** This function will update all commands, or the defined scope */
export async function updateCommands(scope?: 'Guild' | 'Global'): Promise<void> {
const globalCommands: Array<MakeRequired<CreateApplicationCommand, 'name'>> = []
const perGuildCommands: Array<MakeRequired<CreateApplicationCommand, 'name'>> = []
const globalCommands: MakeRequired<CreateApplicationCommand, 'name'>[] = []
const perGuildCommands: MakeRequired<CreateApplicationCommand, 'name'>[] = []
for (const command of commands.values()) {
if (command.scope === 'Guild') {
@@ -44,7 +44,7 @@ export async function updateCommands(scope?: 'Guild' | 'Global'): Promise<void>
/** Update commands for a guild */
export async function updateGuildCommands(bot: Bot, guild: Guild): Promise<void> {
const perGuildCommands: Array<MakeRequired<CreateApplicationCommand, 'name'>> = []
const perGuildCommands: MakeRequired<CreateApplicationCommand, 'name'>[] = []
for (const command of commands.values()) {
if (command.scope === 'Guild') {