mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-30 03:23:51 -05:00
chore: replace Prettier with oxfmt and add oxlint (#6259)
* chore: replace Prettier with oxfmt and add oxlint - Replace Prettier with oxfmt (Prettier-compatible formatter from OXC project) - Add oxlint for fast linting alongside ESLint - Add eslint-plugin-oxlint to disable ESLint rules covered by oxlint - Update lint scripts to run oxfmt, oxlint, then eslint - Update lint-staged configuration for pre-commit hooks - Create .oxfmtrc.json and .oxlintrc.json configuration files - Remove .prettierrc.json and .prettierignore - Reformat codebase with oxfmt * chore: update dependencies in yarn.lock * chore: update oxlint configuration to disable additional rules * chore: update oxfmt and oxlint configurations, enhance test readability
This commit is contained in:
committed by
GitHub
parent
76dadfa5fb
commit
879fd1b054
@@ -320,9 +320,9 @@ export const downloadBudget = createAppAsyncThunk(
|
||||
const opts = {
|
||||
hasExistingKey: Boolean(
|
||||
error.meta &&
|
||||
typeof error.meta === 'object' &&
|
||||
'isMissingKey' in error.meta &&
|
||||
error.meta.isMissingKey,
|
||||
typeof error.meta === 'object' &&
|
||||
'isMissingKey' in error.meta &&
|
||||
error.meta.isMissingKey,
|
||||
),
|
||||
cloudFileId,
|
||||
onSuccess: () => {
|
||||
|
||||
@@ -132,7 +132,7 @@ function AppInner() {
|
||||
|
||||
initAll().catch(showErrorBoundary);
|
||||
// Removed cloudFileId & t from dependencies to prevent hard crash when closing budget in Electron
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [dispatch, showErrorBoundary]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -70,7 +70,7 @@ export function MobileNavTabs() {
|
||||
config: canceled ? config.wobbly : config.stiff,
|
||||
});
|
||||
},
|
||||
[api, OPEN_FULL_Y],
|
||||
[api],
|
||||
);
|
||||
|
||||
const openDefault = useCallback(
|
||||
@@ -82,7 +82,7 @@ export function MobileNavTabs() {
|
||||
config: { ...config.stiff, velocity },
|
||||
});
|
||||
},
|
||||
[api, OPEN_DEFAULT_Y],
|
||||
[api],
|
||||
);
|
||||
|
||||
const hide = useCallback(
|
||||
@@ -94,7 +94,7 @@ export function MobileNavTabs() {
|
||||
config: { ...config.stiff, velocity },
|
||||
});
|
||||
},
|
||||
[api, HIDDEN_Y],
|
||||
[api],
|
||||
);
|
||||
|
||||
const navTabs = [
|
||||
|
||||
@@ -381,7 +381,7 @@ function SelectedTransactionsFloatingActionBar({
|
||||
const canMerge = useMemo(() => {
|
||||
return Boolean(
|
||||
twoTransactions &&
|
||||
twoTransactions[0].amount === twoTransactions[1].amount,
|
||||
twoTransactions[0].amount === twoTransactions[1].amount,
|
||||
);
|
||||
}, [twoTransactions]);
|
||||
|
||||
|
||||
@@ -95,8 +95,7 @@ export function CreateEncryptionKeyModal({
|
||||
We will generate a key based on a password and use it to
|
||||
encrypt from now on.{' '}
|
||||
<strong>This requires a sync reset</strong> and all other
|
||||
devices will have to revert to this version of your
|
||||
data.{' '}
|
||||
devices will have to revert to this version of your data.{' '}
|
||||
</Trans>
|
||||
<Link
|
||||
variant="external"
|
||||
|
||||
@@ -746,7 +746,6 @@ export function ImportTransactionsModal({
|
||||
|
||||
runImportPreview();
|
||||
// intentionally exclude runImportPreview from dependencies to avoid infinite rerenders
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [
|
||||
filetype,
|
||||
flipAmount,
|
||||
|
||||
@@ -394,7 +394,6 @@ function CustomReportInner({ report: initialReport }: CustomReportInnerProps) {
|
||||
|
||||
run();
|
||||
// omitted `conditions` and `conditionsOp` from dependencies to avoid infinite loops
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [
|
||||
interval,
|
||||
dateRange,
|
||||
|
||||
@@ -350,7 +350,6 @@ export function ScheduleEditModal({ id, transaction }: ScheduleEditModalProps) {
|
||||
}
|
||||
|
||||
run();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -138,7 +138,7 @@ export function SelectedTransactionsButton({
|
||||
const canMerge = useMemo(() => {
|
||||
return Boolean(
|
||||
twoTransactions &&
|
||||
twoTransactions[0].amount === twoTransactions[1].amount,
|
||||
twoTransactions[0].amount === twoTransactions[1].amount,
|
||||
);
|
||||
}, [twoTransactions]);
|
||||
|
||||
|
||||
@@ -19,6 +19,5 @@ export function useEffectAfterMount(
|
||||
return effect();
|
||||
}
|
||||
isFirstRender.current = false;
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, deps);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ export function useQuery<Response = unknown>(
|
||||
// Memo the resulting query. We don't care if the function
|
||||
// that creates the query changes, only the resulting query.
|
||||
// Safe to ignore the eslint warning here.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
const query = useMemo(makeQuery, dependencies);
|
||||
|
||||
const [data, setData] = useState<ReadonlyArray<Response> | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user