From ca33ce5fb544bae14c79468b99dfddc0daa2973b Mon Sep 17 00:00:00 2001 From: Andrew Bobkov Date: Thu, 18 Jul 2024 15:42:41 +0000 Subject: [PATCH] chore: Enable `verbatimModuleSyntax` in `tsconfig.json` and add type prefixes --- src/hook/index.tsx | 16 ++++++++-------- tsconfig.json | 4 +++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/hook/index.tsx b/src/hook/index.tsx index 1fe9e6f..154903f 100644 --- a/src/hook/index.tsx +++ b/src/hook/index.tsx @@ -1,22 +1,22 @@ import React, { - FormEvent, - ReactNode, + type FormEvent, + type ReactNode, useEffect, useMemo, useState, } from "react"; import { - FetcherWithComponents, - SubmitFunction, + type FetcherWithComponents, + type SubmitFunction, useActionData, useSubmit, useNavigation, - FormEncType, - FormMethod, + type FormEncType, + type FormMethod, } from "@remix-run/react"; import { - SubmitErrorHandler, - SubmitHandler, + type SubmitErrorHandler, + type SubmitHandler, useFormContext, } from "react-hook-form"; import { useForm, FormProvider } from "react-hook-form"; diff --git a/tsconfig.json b/tsconfig.json index 6f7b89c..4a83886 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -101,7 +101,9 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + + "verbatimModuleSyntax": true, /* Require `type` prefix for type-only imports */ }, "exclude": [ "./bin/**/*.test.ts",