Skip to content

Commit 03a7406

Browse files
committed
chore: use verbatim module syntax
1 parent 7ff8783 commit 03a7406

File tree

19 files changed

+35
-34
lines changed

19 files changed

+35
-34
lines changed

packages/jellycommands/src/JellyCommands.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { JellyCommandsOptions, jellyCommandsOptionsSchema } from './options';
2-
import { SortedPlugins, sortPlugins } from './plugins/plugins';
1+
import { type JellyCommandsOptions, jellyCommandsOptionsSchema } from './options';
2+
import { type SortedPlugins, sortPlugins } from './plugins/plugins';
3+
import { type Logger, createLogger } from './utils/logger';
34
import { cleanToken, resolveToken } from './utils/token';
4-
import { Logger, createLogger } from './utils/logger';
55
import { loadComponents } from './components/loader';
66
import { RouteBases } from 'discord-api-types/v10';
77
import { type FetchOptions, ofetch } from 'ofetch';

packages/jellycommands/src/buttons/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import type { BaseComponentOptions } from '../components/components';
12
import type { InteractionDeferReplyOptions } from 'discord.js';
2-
import { BaseComponentOptions } from '../components/components';
33
import type { MaybePromise } from '../utils/types';
44
import { z } from 'zod';
55

packages/jellycommands/src/commands/cache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { CommandIDMap, ResolvedCommands } from './types';
2-
import { JellyCommands } from '../JellyCommands';
1+
import type { CommandIDMap, ResolvedCommands } from './types';
2+
import type { JellyCommands } from '../JellyCommands';
33
import { registerCommands } from './register';
44
import { Cache } from '../structures/Cache';
5-
import { AnyCommand } from './types/types';
5+
import type { AnyCommand } from './types/types';
66

77
export async function getCommandIdMap(
88
client: JellyCommands,

packages/jellycommands/src/commands/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { GuildCommands, GlobalCommands } from './types.d';
22
import { defineComponentPlugin } from '../plugins/plugins';
3-
import { JellyCommands } from '../JellyCommands';
4-
import { AnyCommand } from './types/types';
3+
import type { JellyCommands } from '../JellyCommands';
4+
import type { AnyCommand } from './types/types';
55
import { getCommandIdMap } from './cache';
66
import { respond } from './respond';
77

packages/jellycommands/src/commands/register.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { APIApplicationCommand, Routes } from 'discord-api-types/v10';
2-
import { CommandIDMap, ResolvedCommands } from './types';
1+
import { type APIApplicationCommand, Routes } from 'discord-api-types/v10';
2+
import type { CommandIDMap, ResolvedCommands } from './types';
33
import { JellyCommands } from '../JellyCommands';
44
import { getAuthData } from '../utils/token';
55

packages/jellycommands/src/commands/respond.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Command } from './types/commands/Command';
22
import { JellyCommands } from '../JellyCommands';
3-
import { Interaction } from 'discord.js';
4-
import { CommandIDMap } from './types';
3+
import type { Interaction } from 'discord.js';
4+
import type { CommandIDMap } from './types';
55

66
export interface CommandReponseData {
77
client: JellyCommands;

packages/jellycommands/src/commands/types/BaseCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import type { RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v
22
import type { CommandInteraction, ContextMenuCommandInteraction } from 'discord.js';
33
import type { ApplicationCommandType } from 'discord-api-types/v10';
44
import type { JellyCommands } from '../../JellyCommands';
5+
import type { MaybePromise } from '../../utils/types';
6+
import type { BaseOptions } from './options';
57
import type { AnyZodObject } from 'zod';
68

79
import { Component } from '../../components/components';
810
import { PermissionsBitField } from 'discord.js';
9-
import { MaybePromise } from '../../utils/types';
1011
import { COMMAND_COMPONENT_ID } from '../plugin';
1112
import { parseSchema } from '../../utils/zod';
12-
import { BaseOptions } from './options';
1313
import { createHash } from 'crypto';
1414

1515
type AnyCommandInteraction = CommandInteraction | ContextMenuCommandInteraction;

packages/jellycommands/src/commands/types/commands/Command.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { APIApplicationCommandOption } from 'discord-api-types/v10';
2+
import { commandSchema, type CommandOptions } from './options';
23
import { ApplicationCommandType } from 'discord-api-types/v10';
34
import type { JellyApplicationCommandOption } from './types';
45
import type { JellyCommands } from '../../../JellyCommands';
5-
import { commandSchema, CommandOptions } from './options';
6+
import type { MaybePromise } from '../../../utils/types';
67
import type { CommandCallback } from '../BaseCommand';
7-
import { MaybePromise } from '../../../utils/types';
88
import { ApplicationCommand } from 'discord.js';
99
import { BaseCommand } from '../BaseCommand';
1010
import {

packages/jellycommands/src/commands/types/commands/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { z } from 'zod';
21
import { baseCommandSchema } from '../../../commands/types/options';
32
import type { BaseOptions } from '../../../commands/types/options';
43
import type { JellyApplicationCommandOption } from './types';
54
import type { Locale } from 'discord-api-types/v10';
5+
import { z } from 'zod';
66

77
export interface CommandOptions extends BaseOptions {
88
/**

packages/jellycommands/src/commands/types/commands/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
2+
type ApplicationCommandOptionChoiceData,
3+
type BaseApplicationCommandOptionsData,
24
ApplicationCommandOptionType,
3-
BaseApplicationCommandOptionsData,
4-
ApplicationCommandOptionChoiceData,
55
ChannelType,
66
} from 'discord.js';
77

packages/jellycommands/src/commands/types/messageCommands/MessageCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { CommandCallback } from '../../../commands/types/BaseCommand';
22
import type { MessageContextMenuCommandInteraction } from 'discord.js';
33

4-
import { messageCommandSchema, MessageCommandOptions } from './options';
4+
import { messageCommandSchema, type MessageCommandOptions } from './options';
55
import { BaseCommand } from '../../../commands/types/BaseCommand';
66
import { ApplicationCommandType } from 'discord-api-types/v10';
77

packages/jellycommands/src/commands/types/userCommands/UserCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { CommandCallback } from '../../../commands/types/BaseCommand';
22
import type { UserContextMenuCommandInteraction } from 'discord.js';
33

4-
import { userCommandSchema, UserCommandOptions } from './options';
4+
import { userCommandSchema, type UserCommandOptions } from './options';
55
import { BaseCommand } from '../../../commands/types/BaseCommand';
66
import { ApplicationCommandType } from 'discord-api-types/v10';
77

packages/jellycommands/src/components/loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { basename, extname, join, resolve } from 'node:path';
22
import { isComponent, type Component } from './components';
3-
import { JellyCommands } from '../JellyCommands';
3+
import type { JellyCommands } from '../JellyCommands';
44
import { readdir, stat } from 'node:fs/promises';
55
import { SetMap } from '../structures/SetMap';
66
import { pathToFileURL } from 'node:url';

packages/jellycommands/src/events/Event.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Component, isComponent } from '../components/components';
2+
import { eventSchema, type EventOptions } from './options';
23
import type { JellyCommands } from '../JellyCommands';
3-
import { eventSchema, EventOptions } from './options';
4+
import type { MaybePromise } from '../utils/types';
45
import { EVENTS_COMPONENT_ID } from './plugin';
56
import type { ClientEvents } from 'discord.js';
6-
import { MaybePromise } from '../utils/types';
77
import { parseSchema } from '../utils/zod';
88

99
// eslint-disable-next-line @typescript-eslint/ban-types

packages/jellycommands/src/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ClientOptions, InteractionReplyOptions, MessagePayload } from 'discord.js';
2-
import { LoadableComponents } from './components/loader';
2+
import type { LoadableComponents } from './components/loader';
33
import { isComponent } from './components/components';
44
import { snowflakeSchema } from './utils/snowflake';
55
// import { AnyPlugin } from './plugins/plugins';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { buttonsPlugin } from '../buttons/plugin';
22
import { commandsPlugin } from '../commands/plugin';
33
import { eventsPlugin } from '../events/plugin';
4-
import { AnyPlugin } from './plugins';
4+
import type { AnyPlugin } from './plugins';
55

66
export const CORE_PLUGINS: AnyPlugin[] = [buttonsPlugin, commandsPlugin, eventsPlugin];

packages/jellycommands/src/plugins/plugins.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Component } from '../components/components';
2-
import { JellyCommands } from '../JellyCommands';
3-
import { MaybePromise } from '../utils/types';
1+
import type { Component } from '../components/components';
2+
import type { JellyCommands } from '../JellyCommands';
3+
import type { MaybePromise } from '../utils/types';
44

55
/**
66
* Component plugins "provide" for components.

packages/jellycommands/src/utils/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { JellyCommands } from '../JellyCommands';
1+
import type { JellyCommands } from '../JellyCommands';
22

33
export interface Logger {
44
(...messages: any[]): void;

packages/jellycommands/tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
3-
"target": "es2019",
3+
"target": "es2022",
44
"module": "esnext",
5-
"lib": ["ES2020"],
5+
"lib": ["es2023"],
66
"moduleResolution": "Bundler",
77

88
"strict": true,
@@ -15,7 +15,8 @@
1515
"forceConsistentCasingInFileNames": true,
1616
"skipLibCheck": true,
1717
"noEmit": true,
18-
"declaration": false
18+
"declaration": false,
19+
"verbatimModuleSyntax": true
1920
},
2021
"include": ["src/**/*.ts", "ambient.d.ts", "tests/**/*.ts"],
2122
"exclude": ["node_modules/**", "dist/**"]

0 commit comments

Comments
 (0)