mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-11-18 07:22:06 +00:00
fix linting errors - unused deps etc
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
||||||
"ignorePatterns": ["leaflet.d.ts"]
|
"ignorePatterns": ["**/leaflet.d.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{
|
{
|
||||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||||
|
"ignorePatterns": [
|
||||||
|
"**/leaflet.d.ts"
|
||||||
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"typescript",
|
"typescript",
|
||||||
"unicorn",
|
"unicorn",
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@
|
|||||||
"@infra-blocks/zod-utils": "^0.4.2",
|
"@infra-blocks/zod-utils": "^0.4.2",
|
||||||
"@next/bundle-analyzer": "^16.3.6",
|
"@next/bundle-analyzer": "^16.3.6",
|
||||||
"@serwist/next": "^9.5.12",
|
"@serwist/next": "^9.5.12",
|
||||||
"@socialgouv/matomo-next": "^1.10.0",
|
"@socialgouv/matomo-next": "^1.14.2",
|
||||||
"@tanstack/react-query": "^5.29.0",
|
"@tanstack/react-query": "^5.29.0",
|
||||||
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.114",
|
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.114",
|
||||||
"@types/node": "^22.7.2",
|
"@types/node": "^22.7.2",
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const EditZone = () => {
|
|||||||
|
|
||||||
await refetch();
|
await refetch();
|
||||||
router.push("/zones");
|
router.push("/zones");
|
||||||
} catch (error) {
|
} catch {
|
||||||
setResponseMessage({
|
setResponseMessage({
|
||||||
type: "error",
|
type: "error",
|
||||||
message: t("createFailure"),
|
message: t("createFailure"),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect, type ReactNode } from "react";
|
||||||
|
|
||||||
import { useSession } from "next-auth/react";
|
import { useSession } from "next-auth/react";
|
||||||
import { useLocale } from "next-intl";
|
import { useLocale } from "next-intl";
|
||||||
@@ -10,11 +10,11 @@ import { setUserLocale } from "@/server/setUserLocale";
|
|||||||
import { usePathname, useRouter } from "@/utils/routing";
|
import { usePathname, useRouter } from "@/utils/routing";
|
||||||
|
|
||||||
type LocaleCheckerProps = {
|
type LocaleCheckerProps = {
|
||||||
children?: React.ReactNode;
|
children?: ReactNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LocaleChecker = ({ children }: LocaleCheckerProps) => {
|
export const LocaleChecker = ({ children }: LocaleCheckerProps) => {
|
||||||
const { data: sessionData, status, update } = useSession();
|
const { data: sessionData, status } = useSession();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|||||||
@@ -52,14 +52,11 @@ export const AsyncSelectField = <
|
|||||||
hideErrorMessage,
|
hideErrorMessage,
|
||||||
required,
|
required,
|
||||||
size,
|
size,
|
||||||
|
|
||||||
loadOption,
|
loadOption,
|
||||||
loadOptions,
|
loadOptions,
|
||||||
onInformChange,
|
onInformChange,
|
||||||
|
|
||||||
placeholder,
|
placeholder,
|
||||||
separators,
|
separators,
|
||||||
|
|
||||||
...selectProps
|
...selectProps
|
||||||
}: AsyncSelectFieldProps<TFieldValues, TFieldName, IsMulti, T, D>) => {
|
}: AsyncSelectFieldProps<TFieldValues, TFieldName, IsMulti, T, D>) => {
|
||||||
const t = useTranslations("App");
|
const t = useTranslations("App");
|
||||||
|
|||||||
@@ -88,10 +88,7 @@ export const Select = <
|
|||||||
T = string,
|
T = string,
|
||||||
D = unknown,
|
D = unknown,
|
||||||
>({
|
>({
|
||||||
className,
|
|
||||||
required,
|
|
||||||
size,
|
size,
|
||||||
|
|
||||||
placeholder,
|
placeholder,
|
||||||
separators,
|
separators,
|
||||||
hasError,
|
hasError,
|
||||||
@@ -121,7 +118,7 @@ export const Select = <
|
|||||||
}}
|
}}
|
||||||
classNames={{
|
classNames={{
|
||||||
...classNames(hasError ?? false, separators ?? false),
|
...classNames(hasError ?? false, separators ?? false),
|
||||||
...(classNameOverrides ?? {}),
|
...classNameOverrides,
|
||||||
}}
|
}}
|
||||||
{...selectProps}
|
{...selectProps}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import React from "react";
|
|
||||||
|
|
||||||
import { flatMap, get, isArray, isNil, isObject } from "lodash";
|
import { flatMap, get, isArray, isNil, isObject } from "lodash";
|
||||||
import { useTranslations } from "next-intl";
|
|
||||||
import {
|
import {
|
||||||
Controller,
|
Controller,
|
||||||
FieldPath,
|
FieldPath,
|
||||||
@@ -47,13 +44,9 @@ export const SelectField = <
|
|||||||
label,
|
label,
|
||||||
hideErrorMessage,
|
hideErrorMessage,
|
||||||
required,
|
required,
|
||||||
|
|
||||||
placeholder,
|
|
||||||
separators,
|
|
||||||
options,
|
options,
|
||||||
...selectProps
|
...selectProps
|
||||||
}: SelectFieldProps<TFieldValues, TFieldName, IsMulti, T, D>) => {
|
}: SelectFieldProps<TFieldValues, TFieldName, IsMulti, T, D>) => {
|
||||||
const t = useTranslations("App");
|
|
||||||
const form = useFormContext<TFieldValues>();
|
const form = useFormContext<TFieldValues>();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {
|
|||||||
Controller,
|
Controller,
|
||||||
FieldPath,
|
FieldPath,
|
||||||
FieldValues,
|
FieldValues,
|
||||||
useFormContext,
|
|
||||||
} from "react-hook-form";
|
} from "react-hook-form";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
@@ -34,14 +33,8 @@ export const SwitchField = <
|
|||||||
disabled,
|
disabled,
|
||||||
className,
|
className,
|
||||||
labelClassName,
|
labelClassName,
|
||||||
|
|
||||||
childrenWrapperClassName,
|
|
||||||
hideErrorMessage,
|
|
||||||
|
|
||||||
...rest
|
...rest
|
||||||
} = props;
|
} = props;
|
||||||
const form = useFormContext<TFieldValues>();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Field
|
<Field
|
||||||
{...{
|
{...{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React from "react";
|
import type {HTMLProps, ReactNode} from 'react'
|
||||||
|
|
||||||
import { get } from "lodash";
|
import { get } from "lodash";
|
||||||
import {
|
import {
|
||||||
@@ -19,9 +19,9 @@ type TextAreaFieldProps<
|
|||||||
TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
||||||
> = Prettify<
|
> = Prettify<
|
||||||
GenericFieldProps<TFieldValues, TFieldName> &
|
GenericFieldProps<TFieldValues, TFieldName> &
|
||||||
Omit<React.HTMLProps<HTMLTextAreaElement>, "ref" | "name"> & {
|
Omit<HTMLProps<HTMLTextAreaElement>, "ref" | "name"> & {
|
||||||
handleChanged?: (props: { name: string }) => void;
|
handleChanged?: (props: { name: string }) => void;
|
||||||
startIcon?: React.ReactNode;
|
startIcon?: ReactNode;
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
@@ -40,11 +40,7 @@ export const TextAreaField = <
|
|||||||
labelClassName,
|
labelClassName,
|
||||||
childrenWrapperClassName,
|
childrenWrapperClassName,
|
||||||
hideErrorMessage = false,
|
hideErrorMessage = false,
|
||||||
|
|
||||||
startIcon,
|
|
||||||
handleChanged,
|
|
||||||
required,
|
required,
|
||||||
|
|
||||||
disabled,
|
disabled,
|
||||||
...rest
|
...rest
|
||||||
} = props;
|
} = props;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { on } from "events";
|
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { FieldPath, FieldValues } from "react-hook-form";
|
import { FieldPath, FieldValues } from "react-hook-form";
|
||||||
import { FaExternalLinkAlt } from "react-icons/fa";
|
import { FaExternalLinkAlt } from "react-icons/fa";
|
||||||
|
|||||||
Reference in New Issue
Block a user