nicolium: oxlint and oxfmt migration, remove eslint

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-15 13:30:55 +01:00
parent 81132cbd57
commit 9f98b5b07d
774 changed files with 23981 additions and 15283 deletions

View File

@@ -11,7 +11,7 @@ const STANDALONE_CHECK_SUCCESS = 'STANDALONE_CHECK_SUCCESS' as const;
/** Figure out the appropriate instance to fetch depending on the state */
const getHost = (state: RootState) => {
const accountUrl = getMeUrl(state) ?? getAuthUserUrl(state) as string;
const accountUrl = getMeUrl(state) ?? (getAuthUserUrl(state) as string);
try {
return new URL(accountUrl).host;
@@ -47,13 +47,23 @@ interface StandaloneCheckSuccessAction {
const checkIfStandalone = () => (dispatch: AppDispatch) =>
staticFetch('/api/v1/instance', { method: 'GET' })
.then(({ ok, headers }) => dispatch<StandaloneCheckSuccessAction>({ type: STANDALONE_CHECK_SUCCESS, ok: ok && !!headers.get('content-type')?.includes('application/json') }))
.catch((err) => dispatch<StandaloneCheckSuccessAction>({ type: STANDALONE_CHECK_SUCCESS, ok: err.response?.ok }));
.then(({ ok, headers }) =>
dispatch<StandaloneCheckSuccessAction>({
type: STANDALONE_CHECK_SUCCESS,
ok: ok && !!headers.get('content-type')?.includes('application/json'),
}),
)
.catch((err) =>
dispatch<StandaloneCheckSuccessAction>({
type: STANDALONE_CHECK_SUCCESS,
ok: err.response?.ok,
}),
);
type InstanceAction =
InstanceFetchSuccessAction
| InstanceFetchSuccessAction
| InstanceFetchFailAction
| StandaloneCheckSuccessAction
| StandaloneCheckSuccessAction;
export {
INSTANCE_FETCH_SUCCESS,