Skip to content

Commit

Permalink
fix: include plugin meta information with snapshot processor for ES…
Browse files Browse the repository at this point in the history
…Lint v9 (#1484)
  • Loading branch information
Logicer16 committed Jan 1, 2024
1 parent f8ae570 commit 067e246
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 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
Expand Down

0 comments on commit 067e246

Please sign in to comment.