This commit is contained in:
Manav Rathi
2024-11-19 19:38:42 +05:30
parent 938679922c
commit c506eec544
5 changed files with 13 additions and 7 deletions

View File

@@ -9,4 +9,11 @@ export default [
// that possibly arise from it not being able to locate ffmpeg-wasm.
ignores: ["**/ffmpeg/worker.ts"],
},
{
rules: {
/** TODO: New during eslint 8=>9 migration */
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-expressions": "off",
},
},
];

View File

@@ -151,7 +151,7 @@ const parseMetadataDateFromDayjs = (d: Dayjs): ParsedMetadataDate => {
// Check to see if there is a time-zone descriptor of the form "Z" or
// "±05:30" or "±0530" at the end of s.
const m = s.match(/Z|[+-]\d\d:?\d\d$/);
const m = /Z|[+-]\d\d:?\d\d$/.exec(s);
if (m?.index) {
dateTime = s.substring(0, m.index);
offset = s.substring(m.index);

View File

@@ -114,7 +114,6 @@ export const getNonEmptyMagicMetadataProps = <T>(magicMetadataProps: T): T => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Object.entries(magicMetadataProps).filter(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
([_, v]) => v !== null && v !== undefined,
),
) as T;

View File

@@ -134,7 +134,7 @@ export const pullUserEntities = async (
const entityKeyB64 = await getOrCreateEntityKeyB64(type, masterKey);
let sinceTime = (await savedLatestUpdatedAt(type)) ?? 0;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, no-constant-condition
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
while (true) {
const diff = await userEntityDiff(type, sinceTime, entityKeyB64);
if (diff.length == 0) break;

View File

@@ -8,8 +8,8 @@ export type NotificationAttributes =
interface MessageSubTextNotificationAttributes {
startIcon?: ReactNode;
variant: ButtonProps["color"];
message?: JSX.Element | string;
subtext?: JSX.Element | string;
message?: React.JSX.Element | string;
subtext?: React.JSX.Element | string;
title?: never;
caption?: never;
onClick: () => void;
@@ -19,8 +19,8 @@ interface MessageSubTextNotificationAttributes {
interface TitleCaptionNotificationAttributes {
startIcon?: ReactNode;
variant: ButtonProps["color"];
title?: JSX.Element | string;
caption?: JSX.Element | string;
title?: React.JSX.Element | string;
caption?: React.JSX.Element | string;
message?: never;
subtext?: never;
onClick: () => void;