UNPKG

typescript-eslint-language-service

Version:
25 lines (24 loc) 1.08 kB
/// <reference path="../src/typedef/eslint-internal.d.ts" /> import ts from "typescript"; import type { ConfigArray } from "@eslint/eslintrc"; export type ConfigProviderHost = { readonly readFile: (fileName: string, encoding: string) => string | undefined; readonly watchFile: (path: string, callback: ts.FileWatcherCallback, pollingInterval?: number) => ts.FileWatcher; }; export type ESLintConfigProviderOptions = { host: ConfigProviderHost; log?: (msg: string) => void; directoriesToWatch: string[]; }; export interface ConfigProvider { getConfigArrayForFile(fileName: string): ConfigArray; } export declare class ESLintConfigProvider implements ConfigProvider { private readonly host; private readonly factory; private readonly log; constructor({ host, log, directoriesToWatch }: ESLintConfigProviderOptions); getConfigArrayForFile(fileName: string): ConfigArray<import("@eslint/eslintrc/lib/config-array/extracted-config").InternalConfig>; getConfigForFile(fileName: string): any; private resolveESLintIntrinsicConfigPath; }