Skip to main content

Type Alias: TextContentParser

TextContentParser = Readonly<{ parse: (code: string) => TSESTree.Program; parseForESLint: (code: string) => Readonly<{ ast: TSESTree.Program; services: Readonly<Record<string, never>>; visitorKeys: Readonly<{ Program: readonly []; }>; }>; }>

Defined in: _internal/text-content-parser.ts:17

Parser contract returned to ESLint for raw text content rules.

Remarksโ€‹

The AST is intentionally empty because the associated rules operate on SourceCode#text and report by raw text locations/ranges.