Skip to content

Commit 067e246

Browse files
authored
fix: include plugin meta information with snapshot processor for ESLint v9 (#1484)
1 parent f8ae570 commit 067e246

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/processors/snapshot-processor.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
// https://eslint.org/docs/developer-guide/working-with-plugins#processors-in-plugins
22
// https://github.com/typescript-eslint/typescript-eslint/issues/808
3+
import {
4+
name as packageName,
5+
version as packageVersion,
6+
} from '../../package.json';
37

48
type PostprocessMessage = { ruleId: string };
59

10+
export const meta = { name: packageName, version: packageVersion };
611
export const preprocess = (source: string): string[] => [source];
712
export const postprocess = (messages: PostprocessMessage[][]) =>
813
// snapshot files should only be linted with snapshot specific rules

0 commit comments

Comments
 (0)