Skip to content

Commit 7c2a6a4

Browse files
authored
chore: bump oxc (@Miodec) (#8214)
1 parent b59ccdf commit 7c2a6a4

76 files changed

Lines changed: 566 additions & 549 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

backend/__tests__/__integration__/dal/result.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function createDummyData(
3939
charStats: [0, 0, 0, 0],
4040
acc: 0,
4141
mode: "time",
42-
mode2: "10" as never,
42+
mode2: "10",
4343
quoteLength: 1,
4444
timestamp,
4545
restartCount: 0,

backend/__tests__/__integration__/dal/user.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ describe("UserDal", () => {
21372137
maxLength: 50,
21382138
lastResultTimestamp: 0,
21392139
hourOffset: -1,
2140-
} as any,
2140+
},
21412141
xp: 42,
21422142
inventory: {
21432143
badges: [{ id: 23 }, { id: 5 }],

backend/__tests__/api/controllers/quotes.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe("QuotesController", () => {
160160

161161
beforeEach(() => {
162162
addQuoteMock.mockClear();
163-
addQuoteMock.mockResolvedValue({} as any);
163+
addQuoteMock.mockResolvedValue({});
164164

165165
verifyCaptchaMock.mockClear();
166166
verifyCaptchaMock.mockResolvedValue(true);

backend/__tests__/api/controllers/user.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import GeorgeQueue from "../../../src/queues/george-queue";
2424
import * as DiscordUtils from "../../../src/utils/discord";
2525
import * as Captcha from "../../../src/utils/captcha";
2626
import * as FirebaseAdmin from "../../../src/init/firebase-admin";
27-
import { FirebaseError } from "firebase-admin";
2827
import * as ApeKeysDal from "../../../src/dal/ape-keys";
2928
import * as LogDal from "../../../src/dal/logs";
3029
import { ObjectId } from "mongodb";
@@ -1439,7 +1438,7 @@ describe("user controller test", () => {
14391438
});
14401439
it("should fail for unknown error", async () => {
14411440
//GIVEN
1442-
authUpdateEmailMock.mockRejectedValue({} as FirebaseError);
1441+
authUpdateEmailMock.mockRejectedValue({});
14431442

14441443
//WHEN
14451444
await mockApp

backend/__tests__/middlewares/auth.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe("middlewares/auth", () => {
7777
throw error;
7878
}
7979
return "Next function called";
80-
}) as unknown as NextFunction;
80+
});
8181
});
8282

8383
afterEach(() => {

backend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
"@vitest/coverage-v8": "4.1.5",
8282
"concurrently": "8.2.2",
8383
"openapi3-ts": "2.0.2",
84-
"oxlint": "1.68.0",
85-
"oxlint-tsgolint": "0.23.0",
84+
"oxlint": "1.73.0",
85+
"oxlint-tsgolint": "0.24.0",
8686
"readline-sync": "1.4.10",
8787
"supertest": "7.1.4",
8888
"testcontainers": "11.11.0",

backend/src/api/controllers/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function createResult(
163163
charStats: [131, 0, 0, 0],
164164
acc: random(80, 100),
165165
language: "english",
166-
mode: mode as Mode,
166+
mode: mode,
167167
mode2: mode2 as unknown as never,
168168
timestamp: timestamp.valueOf(),
169169
testDuration: testDuration,

backend/src/api/controllers/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ function getRelevantUserInfo(user: UserDAL.DBUser): RelevantUserInfo {
536536
"ips",
537537
"testActivity",
538538
"suspicious",
539-
]) as RelevantUserInfo;
539+
]);
540540
}
541541

542542
export async function getUser(req: MonkeyRequest): Promise<GetUserResponse> {

backend/src/api/routes/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { getLiveConfiguration } from "../../init/configuration";
3030
import Logger from "../../utils/logger";
3131
import { createExpressEndpoints, initServer } from "@ts-rest/express";
3232
import { ZodIssue } from "zod";
33-
import { MonkeyValidationError } from "@monkeytype/contracts/util/api";
3433
import { authenticateTsRestRequest } from "../../middlewares/auth";
3534
import { rateLimitRequest } from "../../middlewares/rate-limit";
3635
import { verifyPermissions } from "../../middlewares/permission";
@@ -111,9 +110,7 @@ function applyTsRestApiRoutes(app: IRouter): void {
111110
return;
112111
}
113112

114-
res
115-
.status(422)
116-
.json({ message, validationErrors } as MonkeyValidationError);
113+
res.status(422).json({ message, validationErrors });
117114
},
118115
globalMiddleware: [
119116
authenticateTsRestRequest(),

frontend/__tests__/components/common/AnimatedModal.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { render } from "@solidjs/testing-library";
22
import { describe, it, expect, vi, beforeEach } from "vitest";
33

44
import { AnimatedModal } from "../../../src/ts/components/common/AnimatedModal";
5-
import { hideModal, ModalId, showModal } from "../../../src/ts/states/modals";
5+
import { hideModal, showModal } from "../../../src/ts/states/modals";
66

77
describe("AnimatedModal", () => {
88
beforeEach(() => {
9-
showModal("Support" as ModalId);
9+
showModal("Support");
1010
vi.clearAllMocks();
1111

1212
// Mock dialog methods that don't exist in jsdom
@@ -60,7 +60,7 @@ describe("AnimatedModal", () => {
6060
});
6161

6262
it("doesnt render children if not open", () => {
63-
hideModal("Support" as ModalId);
63+
hideModal("Support");
6464
const { modalDiv } = renderModal({});
6565

6666
expect(modalDiv).not.toBeInTheDocument();

0 commit comments

Comments
 (0)