UNPKG

eslint-rule-benchmark

Version:

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

29 lines (28 loc) 790 B
import { Jiti } from 'jiti' interface LoadRuleFromFileOptions { /** The path to the user configuration directory. */ configDirectory: string /** The path to the rule file. */ rulePath: string /** The ID of the rule to load. */ ruleId: string } /** Result of loading a rule from a file. */ interface RuleLoadResult { /** Error message if loading failed. */ error?: string /** The loaded rule module. */ rule?: unknown } /** * Loads an ESLint rule from the specified file path. * * @param jiti - Jiti instance for dynamic imports. * @param options - Options for loading the rule. * @returns Promise resolving to the rule load result. */ export declare function loadRuleFromFile( jiti: Jiti, options: LoadRuleFromFileOptions, ): Promise<RuleLoadResult> export {}