⬅️ Back to Table of Contents
📄 Processor.ts
📊 Analysis Summary
Metric |
Count |
📦 Imports |
1 |
📐 Interfaces |
3 |
📑 Type Aliases |
2 |
📚 Table of Contents
🛠️ File Location:
📂 packages/utils/src/ts-eslint/Processor.ts
📦 Imports
Name |
Source |
Linter |
./Linter |
Interfaces
Interface Code
export interface ProcessorMeta {
/**
* The unique name of the processor.
*/
name: string;
/**
* The a string identifying the version of the processor.
*/
version?: string;
}
Properties
Name |
Type |
Optional |
Description |
name |
string |
✗ |
|
version |
string |
✓ |
|
ProcessorModule
Interface Code
export interface ProcessorModule {
/**
* Information about the processor to uniquely identify it when serializing.
*/
meta?: ProcessorMeta;
/**
* The function to merge messages.
*/
postprocess?: PostProcess;
/**
* The function to extract code blocks.
*/
preprocess?: PreProcess;
/**
* If `true` then it means the processor supports autofix.
*/
supportsAutofix?: boolean;
}
Properties
Name |
Type |
Optional |
Description |
meta |
ProcessorMeta |
✓ |
|
postprocess |
PostProcess |
✓ |
|
preprocess |
PreProcess |
✓ |
|
supportsAutofix |
boolean |
✓ |
|
LooseProcessorModule
Interface Code
export interface LooseProcessorModule {
/**
* Information about the processor to uniquely identify it when serializing.
*/
meta?: { [K in keyof ProcessorMeta]?: ProcessorMeta[K] | undefined };
/**
* The function to merge messages.
*/
/*
eslint-disable-next-line @typescript-eslint/no-explicit-any --
intentionally using `any` to allow bi-directional assignment (unknown and
never only allow unidirectional)
*/
postprocess?: (messagesList: any, filename: string) => any;
/**
* The function to extract code blocks.
*/
/*
eslint-disable-next-line @typescript-eslint/no-explicit-any --
intentionally using `any` to allow bi-directional assignment (unknown and
never only allow unidirectional)
*/
preprocess?: (text: string, filename: string) => any;
/**
* If `true` then it means the processor supports autofix.
*/
supportsAutofix?: boolean | undefined;
}
Properties
Name |
Type |
Optional |
Description |
meta |
{ [K in keyof ProcessorMeta]?: ProcessorMeta[K] | undefined } |
✓ |
|
postprocess |
(messagesList: any, filename: string) => any |
✓ |
|
preprocess |
(text: string, filename: string) => any |
✓ |
|
supportsAutofix |
boolean | undefined |
✓ |
|
Type Aliases
PreProcess
type PreProcess = (
text: string,
filename: string,
) => (string | { filename: string; text: string })[];
PostProcess
type PostProcess = (
messagesList: Linter.LintMessage[][],
filename: string,
) => Linter.LintMessage[];