update frontend lib : eslint + typescript - #1815

This commit is contained in:
Laurent GAY
2025-10-23 11:46:17 +02:00
committed by setop
parent bbf78fa198
commit c3e7f03f54
24 changed files with 1939 additions and 1339 deletions

View File

@@ -189,6 +189,7 @@ const parentDirectory = computed((): string | undefined | null => {
const parentPathResult = parentPath(subjectParams.value.resource_path);
const directory = parentPathResult?.split("/");
const res = directory?.pop();
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
res === "" ? null : res;
}
return null;

View File

@@ -5,8 +5,6 @@ import { EditorView } from "prosemirror-view";
import Image from "@tiptap/extension-image";
import { provideApolloClient, useMutation } from "@vue/apollo-composable";
/* eslint-disable class-methods-use-this */
const CustomImage = Image.extend({
name: "image",
addAttributes() {

View File

@@ -908,6 +908,7 @@ const openDeleteEventModal = () => {
onConfirm: (result: string) => {
console.debug("calling delete event", result);
if (result.trim() === event.value?.title) {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
event.value?.id ? deleteEvent({ eventId: event.value?.id }) : null;
}
},

View File

@@ -313,7 +313,6 @@ const actualLabel = computed((): string => {
return props.label ?? t("Find an address");
});
// eslint-disable-next-line class-methods-use-this
const canShowLocateMeButton = computed((): boolean => {
return window.isSecureContext;
});
@@ -446,7 +445,6 @@ const reverseGeoCode = async (e: LatLng, zoom: number) => {
}
};
// eslint-disable-next-line no-undef
const getLocation = async (): Promise<GeolocationPosition> => {
let errorMessage = t("Failed to get location.");
return new Promise((resolve, reject) => {

View File

@@ -130,6 +130,7 @@ const move = (event: any, type: any) => {
moving.value = false;
if (cardP.value < -30) {
opened.value = false;
// eslint-disable-next-line no-constant-binary-expression
cardP.value = (-cardH.value ?? 0) - stripe.value;
document.body.style.overflow = "";
emit("closed");

View File

@@ -150,7 +150,7 @@ onMounted(async () => {
setLatLng(...initialView.value);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// eslint-disable-next-line no-underscore-dangle
mapElement.value._onResize();
mapElement.value.on("click", () => {
activeElement.value = null;

View File

@@ -100,6 +100,7 @@ const webFingerFetch = async (
hostname: string,
identity: string
): Promise<string> => {
// eslint-disable-next-line no-undef
const scheme = process.env.NODE_ENV === "production" ? "https" : "http";
const data = await (
await fetch(