Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include plugin meta information with snapshot processor for ESLint v9 #1484

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/processors/snapshot-processor.ts
Original file line number Diff line number Diff line change
@@ -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