Add ESLint (#941)
* Add eslint, switch to lint-staged for precommit * Fix all ESLint errors * Update GH workflow to check prettier and eslint
This commit is contained in:
@@ -44,16 +44,14 @@ export class DmChannelDTO {
|
||||
obj.type = channel.type;
|
||||
obj.recipients = (
|
||||
await Promise.all(
|
||||
channel
|
||||
.recipients!.filter(
|
||||
(r) => !excluded_recipients.includes(r.user_id),
|
||||
)
|
||||
channel.recipients
|
||||
?.filter((r) => !excluded_recipients.includes(r.user_id))
|
||||
.map(async (r) => {
|
||||
return await User.findOneOrFail({
|
||||
where: { id: r.user_id },
|
||||
select: PublicUserProjection,
|
||||
});
|
||||
}),
|
||||
}) || [],
|
||||
)
|
||||
).map((u) => new MinimalPublicUserDTO(u));
|
||||
return obj;
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface IReadyGuildDTO {
|
||||
channels: Channel[];
|
||||
data_mode: string; // what is this
|
||||
emojis: Emoji[];
|
||||
guild_scheduled_events: any[];
|
||||
guild_scheduled_events: unknown[]; // TODO
|
||||
id: string;
|
||||
large: boolean | undefined;
|
||||
lazy: boolean;
|
||||
@@ -57,12 +57,12 @@ export interface IReadyGuildDTO {
|
||||
max_video_channel_users: number | undefined;
|
||||
max_members: number | undefined;
|
||||
nsfw_level: number | undefined;
|
||||
hub_type?: any | null; // ????
|
||||
hub_type?: unknown | null; // ????
|
||||
};
|
||||
roles: Role[];
|
||||
stage_instances: any[];
|
||||
stage_instances: unknown[];
|
||||
stickers: Sticker[];
|
||||
threads: any[];
|
||||
threads: unknown[];
|
||||
version: string;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export class ReadyGuildDTO implements IReadyGuildDTO {
|
||||
channels: Channel[];
|
||||
data_mode: string; // what is this
|
||||
emojis: Emoji[];
|
||||
guild_scheduled_events: any[];
|
||||
guild_scheduled_events: unknown[];
|
||||
id: string;
|
||||
large: boolean | undefined;
|
||||
lazy: boolean;
|
||||
@@ -105,12 +105,12 @@ export class ReadyGuildDTO implements IReadyGuildDTO {
|
||||
max_video_channel_users: number | undefined;
|
||||
max_members: number | undefined;
|
||||
nsfw_level: number | undefined;
|
||||
hub_type?: any | null; // ????
|
||||
hub_type?: unknown | null; // ????
|
||||
};
|
||||
roles: Role[];
|
||||
stage_instances: any[];
|
||||
stage_instances: unknown[];
|
||||
stickers: Sticker[];
|
||||
threads: any[];
|
||||
threads: unknown[];
|
||||
version: string;
|
||||
|
||||
constructor(guild: Guild) {
|
||||
|
||||
Reference in New Issue
Block a user