fix: biome

This commit is contained in:
MARCROCK22 2024-08-17 02:38:51 +00:00
parent 07340a98bb
commit 4986bb4603
7 changed files with 80 additions and 88 deletions

View File

@ -1,76 +1,73 @@
{ {
"name": "seyfert", "name": "seyfert",
"version": "1.5.0", "version": "1.5.0",
"description": "The most advanced framework for discord bots", "description": "The most advanced framework for discord bots",
"main": "./lib/index.js", "main": "./lib/index.js",
"module": "./lib/index.js", "module": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"files": [ "files": [
"lib/**" "lib/**"
], ],
"scripts": { "scripts": {
"build": "tsc --outDir ./lib", "build": "tsc --outDir ./lib",
"prepublishOnly": "npm run build", "prepublishOnly": "npm run build",
"prepare": "npm run build && husky", "prepare": "npm run build && husky",
"lint": "biome lint --write ./src", "lint": "biome lint --write ./src",
"format": "biome format --write ./src", "format": "biome format --write ./src",
"check-h": "biome check --write ./src", "check-h": "biome check --write ./src",
"check": "biome check --write --no-errors-on-unmatched ./src" "check": "biome check --write --no-errors-on-unmatched ./src"
}, },
"author": "MARCROCK22", "author": "MARCROCK22",
"license": "Apache-2.0", "license": "Apache-2.0",
"lint-staged": { "lint-staged": {
"*.ts": [ "*.ts": [
"biome check --write" "biome check --write"
] ]
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.8.3", "@biomejs/biome": "1.8.3",
"@commitlint/cli": "^19.4.0", "@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2", "@commitlint/config-conventional": "^19.2.2",
"husky": "^9.1.4", "husky": "^9.1.4",
"lint-staged": "^15.2.9", "lint-staged": "^15.2.9",
"typescript": "^5.5.4" "typescript": "^5.5.4"
}, },
"optionalDependencies": { "optionalDependencies": {
"chokidar": "^3.6.0", "chokidar": "^3.6.0",
"ioredis": "^5.4.1" "ioredis": "^5.4.1"
}, },
"homepage": "https://seyfert.dev", "homepage": "https://seyfert.dev",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/tiramisulabs/seyfert.git" "url": "git+https://github.com/tiramisulabs/seyfert.git"
}, },
"bugs": { "bugs": {
"url": "https://github.com/tiramisulabs/seyfert" "url": "https://github.com/tiramisulabs/seyfert"
}, },
"keywords": [ "keywords": [
"api", "api",
"discord", "discord",
"bots", "bots",
"typescript", "typescript",
"botdev" "botdev"
], ],
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"maintainers": [ "maintainers": [
{ {
"name": "socram03", "name": "socram03",
"url": "https://github.com/socram03" "url": "https://github.com/socram03"
} }
], ],
"contributors": [ "contributors": [
{ {
"name": "Free 公園", "name": "Free 公園",
"url": "https://github.com/FreeAoi" "url": "https://github.com/FreeAoi"
}, },
{ {
"name": "David", "name": "David",
"url": "https://github.com/Drylozu" "url": "https://github.com/Drylozu"
} }
], ]
"trustedDependencies": [
"@biomejs/biome"
]
} }

View File

@ -1,7 +1,6 @@
import type { APIChannel } from '../../types'; import type { APIChannel } from '../../types';
import { fakePromise } from '../../common'; import { fakePromise } from '../../common';
import type { AllChannels } from '../../structures'; import { channelFrom, type AllChannels } from '../../structures';
import channelFrom from '../../structures/channels';
import type { ReturnCache } from '../index'; import type { ReturnCache } from '../index';
import { GuildRelatedResource } from './default/guild-related'; import { GuildRelatedResource } from './default/guild-related';

View File

@ -8,10 +8,8 @@ import {
type APIUser, type APIUser,
ApplicationCommandOptionType, ApplicationCommandOptionType,
} from '../types'; } from '../types';
import { Attachment } from '..';
import type { MakeRequired } from '../common'; import type { MakeRequired } from '../common';
import type { AllChannels } from '../structures'; import { channelFrom, type AllChannels } from '../structures';
import channelFrom from '../structures/channels';
import type { Command, CommandAutocompleteOption, CommandOption, SubCommand } from './applications/chat'; import type { Command, CommandAutocompleteOption, CommandOption, SubCommand } from './applications/chat';
import type { UsingClient } from './applications/shared'; import type { UsingClient } from './applications/shared';
import { import {
@ -21,6 +19,7 @@ import {
Transformers, Transformers,
type UserStructure, type UserStructure,
} from '../client/transformers'; } from '../client/transformers';
import { Attachment } from '../builders';
export type ContextOptionsResolved = { export type ContextOptionsResolved = {
members?: Record<string, APIGuildMember | Omit<APIGuildMember, 'user'> | APIInteractionGuildMember>; members?: Record<string, APIGuildMember | Omit<APIGuildMember, 'user'> | APIInteractionGuildMember>;

View File

@ -6,8 +6,7 @@ import type {
RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody,
APIGuildChannel, APIGuildChannel,
} from '../../types'; } from '../../types';
import { BaseChannel, type GuildRole, type GuildMember } from '../../structures'; import { BaseChannel, type GuildRole, type GuildMember, type AllChannels, channelFrom } from '../../structures';
import channelFrom, { type AllChannels } from '../../structures/channels';
import { PermissionsBitField } from '../../structures/extra/Permissions'; import { PermissionsBitField } from '../../structures/extra/Permissions';
import { BaseShorter } from './base'; import { BaseShorter } from './base';
import { MergeOptions } from '../it/utils'; import { MergeOptions } from '../it/utils';

View File

@ -12,8 +12,7 @@ import type {
RESTPostAPIGuildsJSONBody, RESTPostAPIGuildsJSONBody,
} from '../../types'; } from '../../types';
import { resolveFiles } from '../../builders'; import { resolveFiles } from '../../builders';
import { BaseChannel, Guild, GuildMember, type CreateStickerBodyRequest } from '../../structures'; import { BaseChannel, channelFrom, Guild, GuildMember, type CreateStickerBodyRequest } from '../../structures';
import channelFrom from '../../structures/channels';
import { BaseShorter } from './base'; import { BaseShorter } from './base';
import { type GuildStructure, Transformers } from '../../client/transformers'; import { type GuildStructure, Transformers } from '../../client/transformers';

View File

@ -7,10 +7,10 @@ import type {
RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsJSONBody,
RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody,
} from '../../types'; } from '../../types';
import channelFrom from '../../structures/channels';
import { BaseShorter } from './base'; import { BaseShorter } from './base';
import type { MakeRequired, When } from '../types/util'; import type { MakeRequired, When } from '../types/util';
import type { ThreadChannelStructure } from '../../client/transformers'; import type { ThreadChannelStructure } from '../../client/transformers';
import { channelFrom } from '../../structures';
export class ThreadShorter extends BaseShorter { export class ThreadShorter extends BaseShorter {
/** /**

View File

@ -6,8 +6,7 @@ import type {
} from '../../types'; } from '../../types';
import { toCamelCase } from '../../common'; import { toCamelCase } from '../../common';
import type { AllChannels } from '../../structures'; import { channelFrom, type AllChannels } from '../../structures';
import channelFrom from '../../structures/channels';
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
export const CHANNEL_CREATE = (self: UsingClient, data: GatewayChannelCreateDispatchData) => { export const CHANNEL_CREATE = (self: UsingClient, data: GatewayChannelCreateDispatchData) => {