UNPKG

eslint-rule-benchmark

Version:

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

26 lines (25 loc) 861 B
import { ESLint } from 'eslint' import { RuleConfig } from '../../types/test-case' import { LANGUAGES } from '../../constants' /** Options for creating an ESLint instance. */ interface CreateESLintInstanceOptions { /** Optional path to custom ESLint config file. */ eslintConfigFile?: string /** The path to the user configuration directory. */ configDirectory: string /** Languages to be tested. */ languages: Language[] /** The rule to be tested. */ rule: RuleConfig } type Language = (typeof LANGUAGES)[number] /** * Creates an ESLint instance configured to test a specific rule. * * @param instanceOptions - Options for creating the ESLint instance. * @returns Promise resolving to configured ESLint instance. */ export declare function createESLintInstance( instanceOptions: CreateESLintInstanceOptions, ): Promise<ESLint> export {}