diff --git a/.eslintrc.json b/.eslintrc.json index f61a6ffcf..9634a6710 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -68,6 +68,11 @@ "@typescript-eslint/no-unnecessary-condition": 2, "@typescript-eslint/switch-exhaustiveness-check": 2, "@typescript-eslint/prefer-nullish-coalescing": 2, + "@typescript-eslint/consistent-type-imports": [ + 2, + { "fixStyle": "inline-type-imports" } + ], + "@typescript-eslint/consistent-type-exports": 2, "n/no-unsupported-features/es-syntax": 0 } diff --git a/src/Parser.ts b/src/Parser.ts index 0ba2546d0..30b085dd2 100644 --- a/src/Parser.ts +++ b/src/Parser.ts @@ -1,4 +1,4 @@ -import Tokenizer, { Callbacks, QuoteType } from "./Tokenizer.js"; +import Tokenizer, { type Callbacks, QuoteType } from "./Tokenizer.js"; import { fromCodePoint } from "entities/lib/decode.js"; const formTags = new Set([ diff --git a/src/WritableStream.ts b/src/WritableStream.ts index 50b6883b1..e49391d2f 100644 --- a/src/WritableStream.ts +++ b/src/WritableStream.ts @@ -1,4 +1,4 @@ -import { Parser, Handler, ParserOptions } from "./Parser.js"; +import { Parser, type Handler, type ParserOptions } from "./Parser.js"; /* * NOTE: If either of these two imports produces a type error, * please update your @types/node dependency! diff --git a/src/index.ts b/src/index.ts index ad0a35af2..d854ee4ca 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,13 @@ -import { Parser, ParserOptions } from "./Parser.js"; -export { Parser, type ParserOptions } from "./Parser.js"; +import { Parser, type ParserOptions } from "./Parser.js"; +export type { Handler, ParserOptions } from "./Parser.js"; +export { Parser } from "./Parser.js"; import { DomHandler, - DomHandlerOptions, - ChildNode, - Element, - Document, + type DomHandlerOptions, + type ChildNode, + type Element, + type Document, } from "domhandler"; export {