chore: Run format script (#9531)

* chore: run Prettier

* ci: ensure this is checked

* chore: requested changes

* style: more changes
This commit is contained in:
Jiralite
2023-05-07 15:39:41 +01:00
committed by GitHub
parent 24ac27df4d
commit 4c072048be
3 changed files with 19 additions and 24 deletions

View File

@@ -2,7 +2,7 @@ name: Tests
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
lint: lint:
name: ESLint name: Lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -17,7 +17,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Run ESLint - name: Run Prettier and ESLint
run: npm run lint run: npm run lint
typings: typings:

View File

@@ -5,8 +5,8 @@
"scripts": { "scripts": {
"test": "npm run lint && npm run docs:test && npm run lint:typings && npm run test:typescript", "test": "npm run lint && npm run docs:test && npm run lint:typings && npm run test:typescript",
"test:typescript": "tsc --noEmit && tsd", "test:typescript": "tsc --noEmit && tsd",
"lint": "eslint src", "lint": "prettier --check src/**/*.js typings/**/*.ts && eslint src",
"lint:fix": "eslint src --fix", "lint:fix": "npm run format && eslint src --fix",
"lint:typings": "tslint typings/index.d.ts", "lint:typings": "tslint typings/index.d.ts",
"format": "prettier --write src/**/*.js typings/**/*.ts", "format": "prettier --write src/**/*.js typings/**/*.ts",
"prepare": "is-ci || husky install", "prepare": "is-ci || husky install",

View File

@@ -74,9 +74,7 @@ import {
RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenJSONBody,
Snowflake, Snowflake,
APIGuildScheduledEvent, APIGuildScheduledEvent,
APIActionRowComponent,
APITextInputComponent, APITextInputComponent,
APIModalActionRowComponent,
APIModalSubmitInteraction, APIModalSubmitInteraction,
Permissions, Permissions,
GuildDefaultMessageNotifications, GuildDefaultMessageNotifications,
@@ -88,17 +86,15 @@ import {
GuildHubType, GuildHubType,
GuildVerificationLevel, GuildVerificationLevel,
GuildFeature, GuildFeature,
LocalizationMap LocalizationMap,
} from 'discord-api-types/v9'; } from 'discord-api-types/v9';
import { GuildChannel, Guild, PermissionOverwrites, InteractionType } from '.'; import { GuildChannel, Guild, PermissionOverwrites } from '.';
import type { import type {
AutoModerationActionTypes, AutoModerationActionTypes,
AutoModerationRuleEventTypes, AutoModerationRuleEventTypes,
AutoModerationRuleKeywordPresetTypes, AutoModerationRuleKeywordPresetTypes,
AutoModerationRuleTriggerTypes, AutoModerationRuleTriggerTypes,
InteractionTypes, ApplicationRoleConnectionMetadataTypes,
MessageComponentTypes,
ApplicationRoleConnectionMetadataTypes
} from './enums'; } from './enums';
export type RawActivityData = GatewayActivity; export type RawActivityData = GatewayActivity;
@@ -178,18 +174,18 @@ export type RawMessageData = APIMessage;
export type RawPartialMessageData = GatewayMessageUpdateDispatchData; export type RawPartialMessageData = GatewayMessageUpdateDispatchData;
export interface RawMessageAttachmentData { export interface RawMessageAttachmentData {
id: Snowflake; id: Snowflake;
filename: string; filename: string;
description?: string; description?: string;
content_type?: string; content_type?: string;
size: number; size: number;
url: string; url: string;
proxy_url: string; proxy_url: string;
height?: number | null; height?: number | null;
width?: number | null; width?: number | null;
ephemeral?: boolean; ephemeral?: boolean;
duration_secs?: number; duration_secs?: number;
waveform?: string; waveform?: string;
} }
export type RawMessagePayloadData = export type RawMessagePayloadData =
@@ -294,7 +290,6 @@ export interface APIAutoModerationRuleTriggerMetadata {
mention_raid_protection_enabled?: boolean; mention_raid_protection_enabled?: boolean;
} }
export interface APIGuild extends APIPartialGuild { export interface APIGuild extends APIPartialGuild {
icon_hash?: string | null; icon_hash?: string | null;
discovery_splash: string | null; discovery_splash: string | null;