feat: Replace eslint => oxlint + oxfmt
All checks were successful
Deployment / wordpress (push) Successful in 6s
Deployment / nuxt (push) Successful in 1m4s

This commit is contained in:
2026-02-01 21:53:40 -05:00
parent 58dbcdd25a
commit f831c4e339
57 changed files with 14911 additions and 5932 deletions

View File

@@ -6,7 +6,7 @@ export function useAuthConnexion() {
const { isLoggedIn } = useAuth();
const toast = useToast();
const { fetch: refreshUserSession } = useUserSession();
const routeRedirect = useRoute().query.redirect as string || undefined;
const routeRedirect = (useRoute().query.redirect as string) || undefined;
// Helper: Redirect after login / logout
async function redirectTo(to: string | undefined) {
@@ -30,13 +30,13 @@ export function useAuthConnexion() {
duration: 3000,
});
await redirectTo(redirect);
}
catch (error) {
} catch (error) {
console.log(error);
toast.add({
title: "Erreur de connexion",
color: "error",
description: error instanceof Error ? error.message : "Une erreur est survenue lors de la connexion.",
description:
error instanceof Error ? error.message : "Une erreur est survenue lors de la connexion.",
duration: 5000,
});
}
@@ -56,13 +56,15 @@ export function useAuthConnexion() {
duration: 3000,
});
await redirectTo(redirect);
}
catch (error) {
} catch (error) {
console.log(error);
toast.add({
title: "Erreur de déconnexion",
color: "error",
description: error instanceof Error ? error.message : "Une erreur est survenue lors de la déconnexion.",
description:
error instanceof Error
? error.message
: "Une erreur est survenue lors de la déconnexion.",
duration: 5000,
});
}

View File

@@ -1,3 +1,8 @@
export const useGeneralSettings = () => useAsyncGraphQLQuery("GeneralSettings", {}, {
transform: ({ generalSettings }) => generalSettings,
});
export const useGeneralSettings = () =>
useAsyncGraphQLQuery(
"GeneralSettings",
{},
{
transform: ({ generalSettings }) => generalSettings,
},
);

View File

@@ -11,8 +11,7 @@ export function useProseLinks(refContent: Ref<HTMLElement | null>) {
try {
const hrefUrl = new URL(href);
return hrefUrl.hostname === siteUrl.hostname;
}
catch {
} catch {
return false;
}
};
@@ -25,8 +24,7 @@ export function useProseLinks(refContent: Ref<HTMLElement | null>) {
if (hrefUrl.hostname === siteUrl.hostname) {
return hrefUrl.pathname + hrefUrl.search + hrefUrl.hash;
}
}
catch {
} catch {
// Invalid URL
}
return href;
@@ -39,7 +37,14 @@ export function useProseLinks(refContent: Ref<HTMLElement | null>) {
if (!link) return;
const href = link.getAttribute("href");
if (!href) return;
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || link.target === "_blank" || link.hasAttribute("download")) {
if (
e.metaKey ||
e.ctrlKey ||
e.shiftKey ||
e.altKey ||
link.target === "_blank" ||
link.hasAttribute("download")
) {
return;
}
if (isInternal(href)) {

View File

@@ -2,7 +2,9 @@ import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
export function useResponsive() {
const { isMobileOrTablet } = useDevice();
const breakpoints = useBreakpoints(breakpointsTailwind, { ssrWidth: isMobileOrTablet ? 375 : 1024 });
const breakpoints = useBreakpoints(breakpointsTailwind, {
ssrWidth: isMobileOrTablet ? 375 : 1024,
});
const isDesktop = breakpoints.greaterOrEqual("lg");
return { breakpoints, isDesktop };

View File

@@ -1,3 +1,8 @@
export const useSiteOptions = () => useAsyncGraphQLQuery("SiteOptions", {}, {
transform: ({ siteOptions }) => siteOptions?.groupSiteOptions,
});
export const useSiteOptions = () =>
useAsyncGraphQLQuery(
"SiteOptions",
{},
{
transform: ({ siteOptions }) => siteOptions?.groupSiteOptions,
},
);