diff --git a/.oxlintrc.json b/.oxlintrc.json index 91955a262..7048f1de2 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -6,9 +6,23 @@ "ignorePatterns": ["dist", "src/client/**/*.gen.ts"], "plugins": ["react", "react-hooks", "typescript"], "rules": { - "no-console": ["warn", { "allow": ["warn", "error"] }], + "no-console": [ + "warn", + { + "allow": ["warn", "error"] + } + ], "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", - "typescript/no-explicit-any": "error" - } + "typescript/no-explicit-any": "error", + "typescript/no-deprecated": "error" + }, + "overrides": [ + { + "files": ["src/client/**"], + "rules": { + "typescript/no-deprecated": "off" + } + } + ] } diff --git a/example/package-lock.json b/example/package-lock.json index 0789132ca..d7eed0baf 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -31,6 +31,7 @@ "@vitejs/plugin-react": "6.1.1", "nodemon": "3.1.14", "oxlint": "1.83.0", + "oxlint-tsgolint": "7.0.2003", "vite": "8.3.0" } }, @@ -101,9 +102,10 @@ "msw": "2.15.0", "oxfmt": "0.68.0", "oxlint": "1.83.0", + "oxlint-tsgolint": "7.0.2003", "postcss-import": "17.0.0", "tsdown": "0.23.0", - "tsx": "4.23.13", + "tsx": "4.23.15", "typescript": "7.0.2", "unrun": "0.3.1", "vitest": "5.0.1" @@ -135,6 +137,90 @@ "url": "https://github.com/sponsors/oxc-project" } }, + "node_modules/@oxlint-tsgolint/darwin-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-7.0.2003.tgz", + "integrity": "sha512-TgV33rXr6ueXBwvc+0nssUkTBSXHJxv77I8p4RCjDjCnvexHtmoPiudVRDfj3S3puMDdeQdHW6jdUgUPy3nr/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint-tsgolint/darwin-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-x64/-/darwin-x64-7.0.2003.tgz", + "integrity": "sha512-hY3FMAjIaPDdK3FNxyRXRfHPOFeoBn6dmnLyKZgQ2IbTTD1adXhl6PfCIqHhCPvurigv7nf7mYuWZZ19MmJzmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint-tsgolint/linux-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-arm64/-/linux-arm64-7.0.2003.tgz", + "integrity": "sha512-eAET4JpyfBbg8SO0K74o4R55tEjVC292pIyxGOw2XGf8x/HrPNyxwQ478jMYOM54FIVOHc8sJ6VRHxluy6lucw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint-tsgolint/linux-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-x64/-/linux-x64-7.0.2003.tgz", + "integrity": "sha512-GXdyO/XyqDJ3s/llR/oOktLsYNjZtWSQBy0JMc+/0gsNPvTcseKPhn9c6KcFyWmnr6H4vljYALbujonqSzzEGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint-tsgolint/win32-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-arm64/-/win32-arm64-7.0.2003.tgz", + "integrity": "sha512-TWauXnPfet0VgpmrstoAK58eJ4gbuwPUuUTQmYQAzE/RG1CpnxXtrKUJULf6lyerPE4KN3gM+DflIA1hOH+38Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxlint-tsgolint/win32-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-x64/-/win32-x64-7.0.2003.tgz", + "integrity": "sha512-DoRmfe7j8VqNlukp8liRVW45GQDhzRccNenjD/pdzelgtffW47pCMd1xbJLkPaPbKnTwID3onn3VZlL7JbebEA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@oxlint/binding-android-arm-eabi": { "version": "1.83.0", "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.83.0.tgz", @@ -3086,6 +3172,24 @@ } } }, + "node_modules/oxlint-tsgolint": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/oxlint-tsgolint/-/oxlint-tsgolint-7.0.2003.tgz", + "integrity": "sha512-VnK4zlqgmgq/7ZcjzCk/WpN8kKFsYGcB85Io9qT3wL4K8Un3RKmJkp793crNETieMusPMKOA4a+Mw2wbteI6TQ==", + "dev": true, + "license": "MIT", + "bin": { + "tsgolint": "bin/tsgolint.js" + }, + "optionalDependencies": { + "@oxlint-tsgolint/darwin-arm64": "7.0.2003", + "@oxlint-tsgolint/darwin-x64": "7.0.2003", + "@oxlint-tsgolint/linux-arm64": "7.0.2003", + "@oxlint-tsgolint/linux-x64": "7.0.2003", + "@oxlint-tsgolint/win32-arm64": "7.0.2003", + "@oxlint-tsgolint/win32-x64": "7.0.2003" + } + }, "node_modules/parse-entities": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", diff --git a/example/package.json b/example/package.json index 5b514b827..a51900a59 100644 --- a/example/package.json +++ b/example/package.json @@ -7,7 +7,7 @@ "audit": "npm audit --audit-level=high", "dev": "nodemon ./dev_server.js", "build": "tsc -b && vite build", - "lint": "oxlint .", + "lint": "oxlint --type-aware .", "preview": "vite preview", "postinstall": "react-flagpack", "test:e2e": "playwright test", @@ -37,6 +37,7 @@ "@vitejs/plugin-react": "6.1.1", "nodemon": "3.1.14", "oxlint": "1.83.0", + "oxlint-tsgolint": "7.0.2003", "vite": "8.3.0" } } diff --git a/example/src/ContractorOnboarding.tsx b/example/src/ContractorOnboarding.tsx index 2443a4083..563abf639 100644 --- a/example/src/ContractorOnboarding.tsx +++ b/example/src/ContractorOnboarding.tsx @@ -830,6 +830,7 @@ export const ContractorOnboardingForm = () => { }); const [showOnboarding, setShowOnboarding] = useState(false); + // oxlint-disable-next-line typescript/no-deprecated const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); setShowOnboarding(true); diff --git a/example/src/CreateCompany.tsx b/example/src/CreateCompany.tsx index 8b84da076..b624f62f1 100644 --- a/example/src/CreateCompany.tsx +++ b/example/src/CreateCompany.tsx @@ -206,6 +206,7 @@ export const CreateCompanyForm = () => { const [formData] = useState({}); const [showOnboarding, setShowOnboarding] = useState(false); + // oxlint-disable-next-line typescript/no-deprecated const handleSubmit = useCallback((e: React.FormEvent) => { e.preventDefault(); setShowOnboarding(true); diff --git a/example/src/flows/Onboarding/Onboarding.tsx b/example/src/flows/Onboarding/Onboarding.tsx index 730361474..ff8aaff35 100644 --- a/example/src/flows/Onboarding/Onboarding.tsx +++ b/example/src/flows/Onboarding/Onboarding.tsx @@ -429,6 +429,7 @@ export const OnboardingForm = () => { }); const [showOnboarding, setShowOnboarding] = useState(false); + // oxlint-disable-next-line typescript/no-deprecated const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); setShowOnboarding(true); diff --git a/example/src/flows/Onboarding/OnboardingWithCustomBenefits.tsx b/example/src/flows/Onboarding/OnboardingWithCustomBenefits.tsx index 9c52d48e5..eaac25234 100644 --- a/example/src/flows/Onboarding/OnboardingWithCustomBenefits.tsx +++ b/example/src/flows/Onboarding/OnboardingWithCustomBenefits.tsx @@ -268,6 +268,7 @@ export const OnboardingCustomBenefitsForm = () => { }); const [showOnboarding, setShowOnboarding] = useState(false); + // oxlint-disable-next-line typescript/no-deprecated const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); setShowOnboarding(true); diff --git a/example/src/flows/Onboarding/OnboardingWithoutSelectCountryStep.tsx b/example/src/flows/Onboarding/OnboardingWithoutSelectCountryStep.tsx index 611eea972..88fb86556 100644 --- a/example/src/flows/Onboarding/OnboardingWithoutSelectCountryStep.tsx +++ b/example/src/flows/Onboarding/OnboardingWithoutSelectCountryStep.tsx @@ -304,6 +304,7 @@ export const OnboardingForm = () => { }); const [showOnboarding, setShowOnboarding] = useState(false); + // oxlint-disable-next-line typescript/no-deprecated const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); setShowOnboarding(true); diff --git a/package-lock.json b/package-lock.json index 1e5005c6c..a06f3e4f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,6 +71,7 @@ "msw": "2.15.0", "oxfmt": "0.68.0", "oxlint": "1.83.0", + "oxlint-tsgolint": "7.0.2003", "postcss-import": "17.0.0", "tsdown": "0.23.0", "tsx": "4.23.15", @@ -1990,6 +1991,90 @@ "node": "^20.19.0 || >=22.12.0" } }, + "node_modules/@oxlint-tsgolint/darwin-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-7.0.2003.tgz", + "integrity": "sha512-TgV33rXr6ueXBwvc+0nssUkTBSXHJxv77I8p4RCjDjCnvexHtmoPiudVRDfj3S3puMDdeQdHW6jdUgUPy3nr/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint-tsgolint/darwin-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-x64/-/darwin-x64-7.0.2003.tgz", + "integrity": "sha512-hY3FMAjIaPDdK3FNxyRXRfHPOFeoBn6dmnLyKZgQ2IbTTD1adXhl6PfCIqHhCPvurigv7nf7mYuWZZ19MmJzmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint-tsgolint/linux-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-arm64/-/linux-arm64-7.0.2003.tgz", + "integrity": "sha512-eAET4JpyfBbg8SO0K74o4R55tEjVC292pIyxGOw2XGf8x/HrPNyxwQ478jMYOM54FIVOHc8sJ6VRHxluy6lucw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint-tsgolint/linux-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-x64/-/linux-x64-7.0.2003.tgz", + "integrity": "sha512-GXdyO/XyqDJ3s/llR/oOktLsYNjZtWSQBy0JMc+/0gsNPvTcseKPhn9c6KcFyWmnr6H4vljYALbujonqSzzEGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint-tsgolint/win32-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-arm64/-/win32-arm64-7.0.2003.tgz", + "integrity": "sha512-TWauXnPfet0VgpmrstoAK58eJ4gbuwPUuUTQmYQAzE/RG1CpnxXtrKUJULf6lyerPE4KN3gM+DflIA1hOH+38Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxlint-tsgolint/win32-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-x64/-/win32-x64-7.0.2003.tgz", + "integrity": "sha512-DoRmfe7j8VqNlukp8liRVW45GQDhzRccNenjD/pdzelgtffW47pCMd1xbJLkPaPbKnTwID3onn3VZlL7JbebEA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@oxlint/binding-android-arm-eabi": { "version": "1.83.0", "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.83.0.tgz", @@ -8547,6 +8632,24 @@ } } }, + "node_modules/oxlint-tsgolint": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/oxlint-tsgolint/-/oxlint-tsgolint-7.0.2003.tgz", + "integrity": "sha512-VnK4zlqgmgq/7ZcjzCk/WpN8kKFsYGcB85Io9qT3wL4K8Un3RKmJkp793crNETieMusPMKOA4a+Mw2wbteI6TQ==", + "dev": true, + "license": "MIT", + "bin": { + "tsgolint": "bin/tsgolint.js" + }, + "optionalDependencies": { + "@oxlint-tsgolint/darwin-arm64": "7.0.2003", + "@oxlint-tsgolint/darwin-x64": "7.0.2003", + "@oxlint-tsgolint/linux-arm64": "7.0.2003", + "@oxlint-tsgolint/linux-x64": "7.0.2003", + "@oxlint-tsgolint/win32-arm64": "7.0.2003", + "@oxlint-tsgolint/win32-x64": "7.0.2003" + } + }, "node_modules/parse5": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz", diff --git a/package.json b/package.json index 2c31a6c85..de7e42654 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "check-format": "oxfmt --check", "dev": "NODE_ENV=development tsdown --config-loader unrun --watch", "build:reset": "postcss src/styles/reset.css -o ./example/src/css/reset.css", - "lint": "oxlint .", + "lint": "oxlint --type-aware --ignore-pattern 'example/**' .", "lint:workflows": "zizmor .github/workflows/", "lint:workflows:fix": "zizmor --fix .github/workflows/", "format": "oxfmt", @@ -155,6 +155,7 @@ "msw": "2.15.0", "oxfmt": "0.68.0", "oxlint": "1.83.0", + "oxlint-tsgolint": "7.0.2003", "postcss-import": "17.0.0", "tsdown": "0.23.0", "tsx": "4.23.15", diff --git a/src/components/form/fields/TextField.tsx b/src/components/form/fields/TextField.tsx index 1b0a47f52..47eaf19b1 100644 --- a/src/components/form/fields/TextField.tsx +++ b/src/components/form/fields/TextField.tsx @@ -59,6 +59,7 @@ export function TextField({ descriptionSuffix, label, type, + // oxlint-disable-next-line typescript/no-deprecated onChange, metadata: additionalProps, maxLength, diff --git a/src/flows/ContractAmendment/hooks.ts b/src/flows/ContractAmendment/hooks.ts index cf80249be..3a74cae41 100644 --- a/src/flows/ContractAmendment/hooks.ts +++ b/src/flows/ContractAmendment/hooks.ts @@ -182,6 +182,7 @@ export const useContractAmendment = ({ switch (stepState.currentStep.name) { case STEPS.form.name: { + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync } = mutationToPromise( automatableContractAmendmentMutation, ); @@ -193,6 +194,7 @@ export const useContractAmendment = ({ return automatableContractAmendment; } case STEPS.confirmation_form.name: { + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync } = mutationToPromise( createContractAmendmentMutation, ); diff --git a/src/flows/CostCalculator/hooks.tsx b/src/flows/CostCalculator/hooks.tsx index 946c02d3d..7bd59a406 100644 --- a/src/flows/CostCalculator/hooks.tsx +++ b/src/flows/CostCalculator/hooks.tsx @@ -120,6 +120,7 @@ export const useCostCalculator = ( }, ) => { const fieldsMetaRef = useRef<{ + // oxlint-disable-next-line typescript/no-deprecated fields: Meta; }>({ fields: {}, @@ -148,6 +149,7 @@ export const useCostCalculator = ( options, }); const costCalculatorEstimationMutation = useCostCalculatorEstimation(); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: costCalculatorEstimationMutationAsync } = mutationToPromise(costCalculatorEstimationMutation); const employeeBillingCurrency = selectedCountry?.currency; diff --git a/src/flows/CreateCompany/api.ts b/src/flows/CreateCompany/api.ts index 96fa14cc6..ec13858ef 100644 --- a/src/flows/CreateCompany/api.ts +++ b/src/flows/CreateCompany/api.ts @@ -197,6 +197,7 @@ export const useAddressDetailsSchema = ({ }, query: { json_schema_version: + // oxlint-disable-next-line typescript/no-deprecated options?.jsonSchemaVersion?.form_schema?.address_details || 'latest', }, diff --git a/src/flows/CreateCompany/hooks.ts b/src/flows/CreateCompany/hooks.ts index 999c9b0d6..3d34e2d0d 100644 --- a/src/flows/CreateCompany/hooks.ts +++ b/src/flows/CreateCompany/hooks.ts @@ -41,9 +41,11 @@ export const useCreateCompany = ({ const createCompanyMutation = useCreateCompanyRequest(); const updateCompanyMutation = useUpdateCompanyRequest(); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: createCompanyMutationAsync } = mutationToPromise( createCompanyMutation, ); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: updateCompanyMutationAsync } = mutationToPromise( updateCompanyMutation, ); @@ -53,7 +55,9 @@ export const useCreateCompany = ({ ); const [createdCompanyId, setCreatedCompanyId] = useState(null); const fieldsMetaRef = useRef<{ + // oxlint-disable-next-line typescript/no-deprecated company_basic_information: Meta; + // oxlint-disable-next-line typescript/no-deprecated address_details: Meta; }>({ company_basic_information: {}, @@ -292,6 +296,7 @@ export const useCreateCompany = ({ companyId: createdCompanyId, payload, jsonSchemaVersion: + // oxlint-disable-next-line typescript/no-deprecated options?.jsonSchemaVersion?.form_schema?.address_details, }); diff --git a/src/flows/Onboarding/components/OnboardingInvite.tsx b/src/flows/Onboarding/components/OnboardingInvite.tsx index 5b0c166bc..438c82d80 100644 --- a/src/flows/Onboarding/components/OnboardingInvite.tsx +++ b/src/flows/Onboarding/components/OnboardingInvite.tsx @@ -45,10 +45,12 @@ export function OnboardingInvite({ const employmentInviteMutation = useEmploymentInvite(); const useCreateReserveInvoiceMutation = useCreateReserveInvoice(); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: employmentInviteMutationAsync } = mutationToPromise( employmentInviteMutation, ); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: createReserveInvoiceMutationAsync } = mutationToPromise( useCreateReserveInvoiceMutation, ); diff --git a/src/flows/Onboarding/hooks.tsx b/src/flows/Onboarding/hooks.tsx index 99ae5a134..b32481ca8 100644 --- a/src/flows/Onboarding/hooks.tsx +++ b/src/flows/Onboarding/hooks.tsx @@ -484,18 +484,23 @@ export const useOnboarding = ({ const updateEngagementAgreementMutation = useUpdateEmploymentEngagementAgreementDetails(); const updateContractEligibilityMutation = useUpsertContractEligibility(); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: createEmploymentMutationAsync } = mutationToPromise( createEmploymentMutation, ); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: updateEmploymentMutationAsync } = mutationToPromise( updateEmploymentMutation, ); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: updateBenefitsOffersMutationAsync } = mutationToPromise( updateBenefitsOffersMutation, ); // TODO: refactor all uses in onboarding together to avoid having mixed behaviour + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: updateEngagementAgreementMutationAsync } = mutationToPromise(updateEngagementAgreementMutation); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync: updateContractEligibilityMutationAsync } = mutationToPromise(updateContractEligibilityMutation); diff --git a/src/flows/PayrollAdminOnboarding/api.ts b/src/flows/PayrollAdminOnboarding/api.ts index 156690388..65de42047 100644 --- a/src/flows/PayrollAdminOnboarding/api.ts +++ b/src/flows/PayrollAdminOnboarding/api.ts @@ -103,6 +103,7 @@ export const useGPCreateEmployment = () => { body: { type: 'global_payroll_employee', country_code: countryCode, + // oxlint-disable-next-line typescript/no-deprecated engaged_by_entity_slug: legalEntityId, basic_information: basicInformation, external_id: externalId, diff --git a/src/flows/Termination/hooks.tsx b/src/flows/Termination/hooks.tsx index 0d9e6355d..2f5b93045 100644 --- a/src/flows/Termination/hooks.tsx +++ b/src/flows/Termination/hooks.tsx @@ -322,6 +322,7 @@ export const useTermination = ({ const entireTerminationSchema = createHeadlessForm(jsonSchema.data.schema); const createTermination = useCreateTermination(); + // oxlint-disable-next-line typescript/no-deprecated const { mutateAsync } = mutationToPromise(createTermination); async function onSubmit(values: TerminationFormValues) { diff --git a/src/index.tsx b/src/index.tsx index ecbfc0196..8949d7645 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -187,6 +187,7 @@ export type { ZendeskTriggerButtonComponentProps, DrawerComponentProps, PDFPreviewComponentProps, + // oxlint-disable-next-line typescript/no-deprecated Meta, NestedMeta, MetaValues, diff --git a/src/lib/__tests__/mutations.test.ts b/src/lib/__tests__/mutations.test.ts index 510ef6a31..0ce88a841 100644 --- a/src/lib/__tests__/mutations.test.ts +++ b/src/lib/__tests__/mutations.test.ts @@ -123,6 +123,7 @@ describe('normalizeFieldErrors', () => { const fieldErrors: FieldError[] = [ { field: 'email', messages: ['Email is required'] }, ]; + // oxlint-disable-next-line typescript/no-deprecated const meta: Meta = { email: { label: 'Email Address' } }; const result = normalizeFieldErrors(fieldErrors, meta); @@ -203,6 +204,7 @@ describe('mutationToPromise', () => { const result = await mutationToPromise( mockMutation as $TSFixMe, + // oxlint-disable-next-line typescript/no-deprecated ).mutateAsync({}); expect((result as ErrorResponse<{ message: string }>).error.message).toBe( 'Nested error message', @@ -221,6 +223,7 @@ describe('mutationToPromise', () => { const result = await mutationToPromise( mockMutation as $TSFixMe, + // oxlint-disable-next-line typescript/no-deprecated ).mutateAsync({}); expect((result as ErrorResponse<{ message: string }>).error.message).toBe( 'Flat error message',