From fc1ba252b3d75755f1121dccfe5b94ca0d08272a Mon Sep 17 00:00:00 2001 From: michael faith Date: Thu, 4 Sep 2025 05:33:39 -0500 Subject: [PATCH 1/2] fix: improve type compatibility with eslint This change adjusts the `RuleFunction` generic type to default to `any` for the Node, instead of `never`. --- src/types.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index 06a175b..7e35b4c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -6,7 +6,8 @@ export interface JSONParserOptions { jsonSyntax?: JSONSyntax; } -export type RuleFunction = ( +// eslint-disable-next-line @typescript-eslint/no-explicit-any -- used for compatibility with ESLint types +export type RuleFunction = ( node: Node, ) => void; From d8fb504ed19652303572efa7b10b242426f87401 Mon Sep 17 00:00:00 2001 From: michael faith Date: Thu, 4 Sep 2025 05:35:53 -0500 Subject: [PATCH 2/2] add changeset --- .changeset/sour-memes-happen.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sour-memes-happen.md diff --git a/.changeset/sour-memes-happen.md b/.changeset/sour-memes-happen.md new file mode 100644 index 0000000..18fea3b --- /dev/null +++ b/.changeset/sour-memes-happen.md @@ -0,0 +1,5 @@ +--- +"jsonc-eslint-parser": patch +--- + +improve type compatibility with eslint