diff --git a/.oxlintrc.json b/.oxlintrc.json
index 9bc9841aa4..c51a563682 100644
--- a/.oxlintrc.json
+++ b/.oxlintrc.json
@@ -103,6 +103,10 @@
"typescript/no-duplicate-type-constituents": "off",
"typescript/await-thenable": "error",
"typescript/no-floating-promises": "warn", // TODO: covert to error
+ "typescript/require-array-sort-compare": "warn", // TODO: covert to error
+ "typescript/unbound-method": "error",
+ "typescript/no-for-in-array": "warn", // TODO: covert to error
+ "typescript/restrict-template-expressions": "warn", // TODO: covert to error
// Import rules
"import/consistent-type-specifier-style": "error",
diff --git a/packages/crdt/src/crdt/timestamp.test.ts b/packages/crdt/src/crdt/timestamp.test.ts
index 2ceffeac53..fe20ccf83b 100644
--- a/packages/crdt/src/crdt/timestamp.test.ts
+++ b/packages/crdt/src/crdt/timestamp.test.ts
@@ -121,12 +121,12 @@ describe('Timestamp', function () {
it('should fail with counter overflow', function () {
now = 40;
for (let i = 0; i < 65536; i++) Timestamp.send();
- expect(Timestamp.send).toThrow(Timestamp.OverflowError);
+ expect(() => Timestamp.send()).toThrow(Timestamp.OverflowError);
});
it('should fail with clock drift', function () {
now = -(5 * 60 * 1000 + 1);
- expect(Timestamp.send).toThrow(Timestamp.ClockDriftError);
+ expect(() => Timestamp.send()).toThrow(Timestamp.ClockDriftError);
});
});
diff --git a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
index 5a2ea59c1e..30a49cb770 100644
--- a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
+++ b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
@@ -195,13 +195,13 @@ export function EditSyncAccount({ account }: EditSyncAccountProps) {
name="synced-account-edit"
containerProps={{ style: { width: 800 } }}
>
- {({ state: { close } }) => (
+ {({ state }) => (
<>
}
+ rightContent={ state.close()} />}
/>
@@ -246,20 +246,20 @@ export function EditSyncAccount({ account }: EditSyncAccountProps) {
-
diff --git a/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx b/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx
index df15a7888d..a9685bf823 100644
--- a/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx
+++ b/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx
@@ -33,11 +33,11 @@ export function BudgetPageMenuModal({
return (
- {({ state: { close } }) => (
+ {({ state }) => (
<>
}
+ rightContent={ state.close()} />}
/>
defaultMenuItemStyle}
diff --git a/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx b/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx
index aa773d50a7..43327fc33d 100644
--- a/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx
+++ b/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx
@@ -54,7 +54,7 @@ export function CategoryAutocompleteModal({
},
}}
>
- {({ state: { close } }) => (
+ {({ state }) => (
<>
{isNarrowWidth && (
state.close()}
style={{ color: theme.menuAutoCompleteText }}
/>
}
@@ -94,7 +94,7 @@ export function CategoryAutocompleteModal({
closeOnSelect={closeOnSelect}
clearOnSelect={clearOnSelect}
showSplitOption={false}
- onClose={close}
+ onClose={() => state.close()}
{...defaultAutocompleteProps}
onSelect={onSelect}
categoryGroups={categoryGroups}
diff --git a/packages/desktop-client/src/components/modals/CategoryGroupAutocompleteModal.tsx b/packages/desktop-client/src/components/modals/CategoryGroupAutocompleteModal.tsx
index ad1d44b070..f6bc72bd78 100644
--- a/packages/desktop-client/src/components/modals/CategoryGroupAutocompleteModal.tsx
+++ b/packages/desktop-client/src/components/modals/CategoryGroupAutocompleteModal.tsx
@@ -54,7 +54,7 @@ export function CategoryGroupAutocompleteModal({
},
}}
>
- {({ state: { close } }) => (
+ {({ state }) => (
<>
{isNarrowWidth && (
state.close()}
style={{ color: theme.menuAutoCompleteText }}
/>
}
@@ -93,7 +93,7 @@ export function CategoryGroupAutocompleteModal({
closeOnBlur={false}
closeOnSelect={closeOnSelect}
clearOnSelect={clearOnSelect}
- onClose={close}
+ onClose={() => state.close()}
{...defaultAutocompleteProps}
onSelect={onSelect}
categoryGroups={categoryGroups}
diff --git a/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx b/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx
index 6c6d99480a..718e956fa6 100644
--- a/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx
+++ b/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx
@@ -133,7 +133,7 @@ export function CategoryGroupMenuModal({
},
}}
>
- {({ state: { close } }) => (
+ {({ state }) => (
<>
}
- rightContent={}
+ rightContent={ state.close()} />}
/>
defaultMenuItemStyle}
onApplyBudgetTemplatesInGroup={() => {
_onApplyBudgetTemplatesInGroup();
- close();
+ state.close();
showUndoNotification({
message: t('budget templates have been applied.'),
});
diff --git a/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx b/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx
index eb3f06b24c..d255f3efb3 100644
--- a/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx
+++ b/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx
@@ -86,7 +86,7 @@ export function CategoryMenuModal({
style: { height: '45vh' },
}}
>
- {({ state: { close } }) => (
+ {({ state }) => (
<>
}
- rightContent={}
+ rightContent={ state.close()} />}
/>
- {({ state: { close } }) => (
+ {({ state }) => (
<>
}
+ rightContent={ state.close()} />}
/>
@@ -164,7 +164,7 @@ export function CloseAccountModal({