fix: resolve useLiteralKeys biome lint issues (#26851)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Volnei MunhozandDevin AI authored and GitHub committed 2026-01-14 19:13:13 -03:00
1 parent 92d2b59946
commit 53395695b4
10 files changed
+32 -30

No files matched your search

@@ -95,10 +95,10 @@ export class FloatingButton extends HTMLElement {
constructor() {
super();
const dataset = this.dataset as FloatingButtonDataset;
const buttonText = dataset["buttonText"];
const buttonPosition = dataset["buttonPosition"];
const buttonColor = dataset["buttonColor"];
const buttonTextColor = dataset["buttonTextColor"];
const buttonText = dataset.buttonText;
const buttonPosition = dataset.buttonPosition;
const buttonColor = dataset.buttonColor;
const buttonTextColor = dataset.buttonTextColor;
//TODO: Logic is duplicated over HTML generation and attribute change, keep it at one place
const buttonHtml = `<style>${window.Cal.__css}</style> ${getFloatingButtonHtml({
+5 -5
View File
@@ -1015,11 +1015,11 @@ class CalApi {
el = existingEl as FloatingButton;
}
const dataset = el.dataset;
dataset["buttonText"] = buttonText;
dataset["hideButtonIcon"] = `${hideButtonIcon}`;
dataset["buttonPosition"] = `${buttonPosition}`;
dataset["buttonColor"] = `${buttonColor}`;
dataset["buttonTextColor"] = `${buttonTextColor}`;
dataset.buttonText = buttonText;
dataset.hideButtonIcon = `${hideButtonIcon}`;
dataset.buttonPosition = `${buttonPosition}`;
dataset.buttonColor = `${buttonColor}`;
dataset.buttonTextColor = `${buttonTextColor}`;
}
async modal({
+1
View File
@@ -393,6 +393,7 @@ export default abstract class BaseCalendarService implements Calendar {
const dtstartProperty = vevent.getFirstProperty("dtstart");
const tzidFromDtstart = dtstartProperty ? (dtstartProperty as any).jCal[1].tzid : undefined;
const dtstart: { [key: string]: string } | undefined = vevent?.getFirstPropertyValue("dtstart");
// biome-ignore lint/complexity/useLiteralKeys: accessing dynamic property from ICAL.js object
const timezone = dtstart ? dtstart["timezone"] : undefined;
// We check if the dtstart timezone is in UTC which is actually represented by Z instead, but not recognized as that in ICAL.js as UTC
const isUTC = timezone === "Z";
+1 -1
View File
@@ -177,7 +177,7 @@ export const weekdayToWeekIndex = (weekday: WeekDays | string | number | undefin
* @returns Time Zone name
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getTimeZone = (date: Dayjs): string => (date as any)["$x"]["$timezone"];
export const getTimeZone = (date: Dayjs): string => (date as any).$x.$timezone;
/**
* Verify if timeZone has Daylight Saving Time (DST).
+1 -1
View File
@@ -79,7 +79,7 @@ async function getBooking(prisma: PrismaClient, uid: string) {
if (booking) {
// @NOTE: had to do this because Server side cant return [Object objects]
// probably fixable with json.stringify -> json.parse
booking["startTime"] = (booking?.startTime as Date)?.toISOString() as unknown as Date;
booking.startTime = (booking?.startTime as Date)?.toISOString() as unknown as Date;
}
return booking;
+1 -1
View File
@@ -29,7 +29,7 @@ export async function checkCfTurnstileToken({ token, remoteIp }: { token?: strin
const data = await result.json();
if (!data["success"]) {
if (!data.success) {
throw new HttpError({ statusCode: 401, message: INVALID_CLOUDFLARE_TOKEN_ERROR });
}
@@ -177,6 +177,7 @@ describe.skip("editLocation.handler", () => {
],
},
],
// biome-ignore lint/complexity/useLiteralKeys: app keys contain hyphens
apps: [TestData.apps["zoom"], TestData.apps["google-meet"]],
};
@@ -480,16 +480,16 @@ export async function getBookings({
eb
.case()
.when("Booking.status", "=", "cancelled")
.then(BookingStatus["CANCELLED"])
.then(BookingStatus.CANCELLED)
.when("Booking.status", "=", "accepted")
.then(BookingStatus["ACCEPTED"])
.then(BookingStatus.ACCEPTED)
.when("Booking.status", "=", "rejected")
.then(BookingStatus["REJECTED"])
.then(BookingStatus.REJECTED)
.when("Booking.status", "=", "pending")
.then(BookingStatus["PENDING"])
.then(BookingStatus.PENDING)
.when("Booking.status", "=", "awaiting_host")
.then(BookingStatus["AWAITING_HOST"])
.else(BookingStatus["PENDING"])
.then(BookingStatus.AWAITING_HOST)
.else(BookingStatus.PENDING)
.end(), // End of CASE expression
"varchar"
)
@@ -539,11 +539,11 @@ export async function getBookings({
eb
.case()
.when("EventType.schedulingType", "=", "roundRobin")
.then(SchedulingType["ROUND_ROBIN"])
.then(SchedulingType.ROUND_ROBIN)
.when("EventType.schedulingType", "=", "collective")
.then(SchedulingType["COLLECTIVE"])
.then(SchedulingType.COLLECTIVE)
.when("EventType.schedulingType", "=", "managed")
.then(SchedulingType["MANAGED"])
.then(SchedulingType.MANAGED)
.else(null)
.end(),
"varchar" // Or 'text' - use the actual SQL data type
@@ -16,7 +16,7 @@ export const getMeetingInformationHandler = async ({ ctx: _ctx, input }: GetMeet
const { roomName } = input;
try {
const dailyVideoAdapterImport = VideoApiAdapterMap["dailyvideo"];
const dailyVideoAdapterImport = VideoApiAdapterMap.dailyvideo;
if (!dailyVideoAdapterImport) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -86,7 +86,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["pkce_required"],
message: OAUTH_ERROR_REASONS.pkce_required,
})
);
@@ -108,7 +108,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);
@@ -131,7 +131,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input: inputMD5 })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);
@@ -148,7 +148,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input: inputPlain })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);
@@ -266,7 +266,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);
@@ -290,7 +290,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input })).rejects.toThrow(
new TRPCError({
code: "UNAUTHORIZED",
message: OAUTH_ERROR_REASONS["client_not_found"],
message: OAUTH_ERROR_REASONS.client_not_found,
})
);
@@ -349,7 +349,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input: inputInvalid })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);
@@ -366,7 +366,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input: inputPlain })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);
});