mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 19:40:30 +08:00
chore: bump oxlint & enable more supported rules (#14769)
This commit is contained in:
@@ -247,7 +247,7 @@ class TestGeminiVertexProvider extends GeminiVertexProvider {
|
||||
};
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
protected override async fetchRemoteAttach(
|
||||
url: string,
|
||||
signal?: AbortSignal
|
||||
|
||||
@@ -8,7 +8,14 @@ import type { Request, Response } from 'express';
|
||||
import { ClsServiceManager } from 'nestjs-cls';
|
||||
import type { Socket } from 'socket.io';
|
||||
|
||||
export function getRequestResponseFromHost(host: ArgumentsHost) {
|
||||
type RequestResponse = {
|
||||
req: Request;
|
||||
res?: Response;
|
||||
};
|
||||
|
||||
export function getRequestResponseFromHost(
|
||||
host: ArgumentsHost
|
||||
): RequestResponse {
|
||||
switch (host.getType<GqlContextType>()) {
|
||||
case 'graphql': {
|
||||
const gqlContext = GqlArgumentsHost.create(host).getContext<{
|
||||
@@ -44,11 +51,13 @@ export function getRequestResponseFromHost(host: ArgumentsHost) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getRequestFromHost(host: ArgumentsHost) {
|
||||
export function getRequestFromHost(host: ArgumentsHost): Request {
|
||||
return getRequestResponseFromHost(host).req;
|
||||
}
|
||||
|
||||
export function getRequestResponseFromContext(ctx: ExecutionContext) {
|
||||
export function getRequestResponseFromContext(
|
||||
ctx: ExecutionContext
|
||||
): RequestResponse {
|
||||
return getRequestResponseFromHost(ctx);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export class Lock {
|
||||
private release: () => void = () => {};
|
||||
|
||||
async acquire() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
let release: () => void = null!;
|
||||
const nextLock = new Promise<void>(resolve => {
|
||||
release = resolve;
|
||||
|
||||
@@ -820,7 +820,7 @@ export class CalDAVProvider extends CalendarProvider {
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
override async exchangeCode(): Promise<any> {
|
||||
throw new GraphqlBadRequest({
|
||||
code: 'caldav_oauth_unsupported',
|
||||
@@ -828,7 +828,7 @@ export class CalDAVProvider extends CalendarProvider {
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
override async refreshTokens(): Promise<any> {
|
||||
throw new GraphqlBadRequest({
|
||||
code: 'caldav_oauth_unsupported',
|
||||
@@ -836,7 +836,7 @@ export class CalDAVProvider extends CalendarProvider {
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
override async getAccountProfile(): Promise<any> {
|
||||
throw new GraphqlBadRequest({
|
||||
code: 'caldav_oauth_unsupported',
|
||||
|
||||
@@ -344,7 +344,7 @@ export class CopilotTranscriptionResolver {
|
||||
user.id,
|
||||
workspaceId,
|
||||
blobId,
|
||||
// eslint-disable-next-line @typescript-eslint/await-thenable
|
||||
// oxlint-disable-next-line @typescript-eslint/await-thenable
|
||||
await Promise.all(allBlobs),
|
||||
input ?? undefined
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user