manual fixes, disable some errors

This commit is contained in:
itsMapleLeaf
2023-09-27 13:29:20 -05:00
parent 0d4294ee8c
commit 576dd2e35e
6 changed files with 12 additions and 3 deletions

View File

@@ -38,6 +38,10 @@
"node_modules",
"dist",
"packages/website/public/api"
]
],
"rules": {
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/require-await": "off"
}
}
}

View File

@@ -7,7 +7,7 @@ export async function retryWithTimeout<T>(
callback: () => Promise<T> | T,
): Promise<T> {
const startTime = Date.now()
// eslint-disable-next-line no-constant-condition
// eslint-disable-next-line no-constant-condition, @typescript-eslint/no-unnecessary-condition
while (true) {
try {
return await callback()

View File

@@ -18,5 +18,6 @@ export async function waitFor<Result>(
}
}
// eslint-disable-next-line @typescript-eslint/no-throw-literal
throw lastError ?? new Error("Timeout")
}

View File

@@ -374,6 +374,8 @@ function getDiscordMessageOptions(reacordOptions: MessageOptions) {
}
}
// future proofing
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (component.type === "select") {
return {
...component,

View File

@@ -34,7 +34,7 @@ for (const [, channel] of category.children.cache) {
let prefix = 0
const createTest = async (
name: string,
block: (channel: TextChannel) => void | Promise<unknown>,
block: (channel: TextChannel) => unknown,
) => {
prefix += 1
const channel = await category.children.create({

View File

@@ -35,6 +35,7 @@ export function LandingAnimation() {
let running = true
void (async () => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
while (running) {
setState(defaultState)
await delay(700)
@@ -102,6 +103,7 @@ export function LandingAnimation() {
let running = true
void (async () => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
while (running) {
// check if the cursor is in the input
const cursorRect = cursorRef.current!.getBoundingClientRect()