eslint-plugin-mdx
Version:
ESLint Plugin for MDX
28 lines (27 loc) • 1.09 kB
TypeScript
import type { Rule } from 'eslint';
import type { ParserOptions, RemarkRuleOptions } from 'eslint-mdx';
export declare const ANY_OPTION_SCHEMA: {};
export declare const ENABLED_OPTION_SCHEMA: {
additionalProperties: boolean;
properties: {
enabled: {
const: boolean;
};
};
required: string[];
type: string;
};
export declare const getParserOptions: (context: Rule.RuleContext) => ParserOptions;
export declare const isMdxFile: (filename: string, extensions: ParserOptions['extensions']) => boolean;
export declare const isMarkdownFile: (filename: string, markdownExtensions: ParserOptions['markdownExtensions']) => boolean;
export declare const NATIVE_REMARK_RULES: Set<string>;
export declare const getRuleConfig: <RuleName extends keyof RemarkRuleOptions>(context: Rule.RuleContext, name: RuleName) => {
options: RemarkRuleOptions[RuleName];
};
export interface TextNode {
alt?: string | null;
children?: TextNode[];
type: string;
value?: string | null;
}
export declare const getNodeText: (node: TextNode) => string;