From 067e246864813fa88933f06628b6ca0ff31ca863 Mon Sep 17 00:00:00 2001 From: Logicer Date: Tue, 2 Jan 2024 05:44:47 +1100 Subject: [PATCH] fix: include plugin `meta` information with snapshot processor for ESLint v9 (#1484) --- src/processors/snapshot-processor.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/processors/snapshot-processor.ts b/src/processors/snapshot-processor.ts index 8bf53fc33..883074cb8 100644 --- a/src/processors/snapshot-processor.ts +++ b/src/processors/snapshot-processor.ts @@ -1,8 +1,13 @@ // https://eslint.org/docs/developer-guide/working-with-plugins#processors-in-plugins // https://github.com/typescript-eslint/typescript-eslint/issues/808 +import { + name as packageName, + version as packageVersion, +} from '../../package.json'; type PostprocessMessage = { ruleId: string }; +export const meta = { name: packageName, version: packageVersion }; export const preprocess = (source: string): string[] => [source]; export const postprocess = (messages: PostprocessMessage[][]) => // snapshot files should only be linted with snapshot specific rules