UNPKG

@exadel/eslint-plugin-esl

Version:

Helper ESLint rules to find and migrate ESL (@exadel/esl) library deprecations

17 lines (16 loc) 710 B
import type * as ESTree from 'estree'; import type { Rule } from 'eslint'; export interface ESLintReplacementMethodCfg { replacement?: string; message: string; } export interface ESLintDeprecationStaticMethodCfg { /** Class name */ className: string; /** Deprecated static method name */ deprecatedMethod: string; /** Function that returns recommended method */ getReplacementMethod: (expression: ESTree.CallExpression) => ESLintReplacementMethodCfg | string; } /** Builds deprecation rule from {@link ESLintDeprecationStaticMethodCfg} object */ export declare function buildRule(configs: ESLintDeprecationStaticMethodCfg | ESLintDeprecationStaticMethodCfg[]): Rule.RuleModule;