eslint-doc-generator
Version:
Automatic documentation generator for ESLint plugins and rules.
21 lines (20 loc) • 1.1 kB
TypeScript
import type { Context } from './context.js';
import type { SEVERITY_TYPE } from './types.js';
export declare function getConfigsThatSetARule(context: Context, severityType?: SEVERITY_TYPE): string[];
/**
* Get config names that a given rule belongs to.
* @param severityType - Include configs that set the rule to this severity. Omit to allow any severity.
*/
export declare function getConfigsForRule(context: Context, ruleName: string, severityType?: SEVERITY_TYPE): string[];
/**
* Find the representation of a config to display.
* @param context - the context object
* @param configName - name of the config to find an emoji for
* @returns the emoji string to display for the config, or undefined if not found
*/
export declare function findConfigEmoji(context: Context, configName: string): string | undefined;
/**
* Get the emojis for the configs that set a rule to a certain severity.
* Throws an error if a config is missing an emoji.
*/
export declare function getEmojisForConfigsSettingRuleToSeverity(context: Context, ruleName: string, severityType: SEVERITY_TYPE): string[];