UNPKG

eslint-rule-benchmark

Version:

Benchmark ESLint rules with detailed performance metrics for CI and plugin development

24 lines (23 loc) 702 B
import { Linter } from 'eslint' import { Jiti } from 'jiti' import { LANGUAGES } from '../../constants' /** Result of loading a parser from a package. */ interface ParserLoadResult { /** The loaded parser module. */ parser?: Linter.Parser | null /** Error message if loading failed. */ error?: string } type Language = (typeof LANGUAGES)[number] /** * Attempts to load parser for the specified language. * * @param jiti - Jiti instance for dynamic imports. * @param language - The language to load parser for. * @returns Promise resolving to the parser load result. */ export declare function loadLanguageParser( jiti: Jiti, language: Language, ): Promise<ParserLoadResult> export {}