2024-12-03 19:58:28 -08:00
|
|
|
/**
|
|
|
|
* Lint specified Markdown files.
|
|
|
|
*
|
|
|
|
* @param {Options | null} options Configuration options.
|
|
|
|
* @param {LintCallback} callback Callback (err, result) function.
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
export function lintAsync(options: Options | null, callback: LintCallback): void;
|
|
|
|
/**
|
|
|
|
* Lint specified Markdown files.
|
|
|
|
*
|
|
|
|
* @param {Options | null} options Configuration options.
|
|
|
|
* @returns {Promise<LintResults>} Results object.
|
|
|
|
*/
|
|
|
|
export function lintPromise(options: Options | null): Promise<LintResults>;
|
|
|
|
/**
|
|
|
|
* Lint specified Markdown files.
|
|
|
|
*
|
|
|
|
* @param {Options | null} options Configuration options.
|
|
|
|
* @returns {LintResults} Results object.
|
|
|
|
*/
|
|
|
|
export function lintSync(options: Options | null): LintResults;
|
|
|
|
/**
|
|
|
|
* Extend specified configuration object.
|
|
|
|
*
|
|
|
|
* @param {Configuration} config Configuration object.
|
|
|
|
* @param {string} file Configuration file name.
|
|
|
|
* @param {ConfigurationParser[] | undefined} parsers Parsing function(s).
|
|
|
|
* @param {Object} fs File system implementation.
|
|
|
|
* @returns {Promise<Configuration>} Configuration object.
|
|
|
|
*/
|
|
|
|
export function extendConfigPromise(config: Configuration, file: string, parsers: ConfigurationParser[] | undefined, fs: any): Promise<Configuration>;
|
|
|
|
/**
|
|
|
|
* Read specified configuration file.
|
|
|
|
*
|
|
|
|
* @param {string} file Configuration file name.
|
|
|
|
* @param {ConfigurationParser[] | ReadConfigCallback} [parsers] Parsing
|
|
|
|
* function(s).
|
|
|
|
* @param {Object} [fs] File system implementation.
|
|
|
|
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
export function readConfigAsync(file: string, parsers?: ConfigurationParser[] | ReadConfigCallback, fs?: any, callback?: ReadConfigCallback): void;
|
|
|
|
/**
|
|
|
|
* Read specified configuration file.
|
|
|
|
*
|
|
|
|
* @param {string} file Configuration file name.
|
|
|
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
|
|
|
* @param {Object} [fs] File system implementation.
|
|
|
|
* @returns {Promise<Configuration>} Configuration object.
|
|
|
|
*/
|
|
|
|
export function readConfigPromise(file: string, parsers?: ConfigurationParser[], fs?: any): Promise<Configuration>;
|
|
|
|
/**
|
|
|
|
* Read specified configuration file.
|
|
|
|
*
|
|
|
|
* @param {string} file Configuration file name.
|
|
|
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
|
|
|
* @param {Object} [fs] File system implementation.
|
|
|
|
* @returns {Configuration} Configuration object.
|
|
|
|
*/
|
|
|
|
export function readConfigSync(file: string, parsers?: ConfigurationParser[], fs?: any): Configuration;
|
|
|
|
/**
|
|
|
|
* Applies the specified fix to a Markdown content line.
|
|
|
|
*
|
|
|
|
* @param {string} line Line of Markdown content.
|
|
|
|
* @param {RuleOnErrorFixInfo} fixInfo RuleOnErrorFixInfo instance.
|
|
|
|
* @param {string} [lineEnding] Line ending to use.
|
|
|
|
* @returns {string | null} Fixed content or null if deleted.
|
|
|
|
*/
|
|
|
|
export function applyFix(line: string, fixInfo: RuleOnErrorFixInfo, lineEnding?: string): string | null;
|
|
|
|
/**
|
|
|
|
* Applies as many of the specified fixes as possible to Markdown content.
|
|
|
|
*
|
|
|
|
* @param {string} input Lines of Markdown content.
|
|
|
|
* @param {RuleOnErrorInfo[]} errors RuleOnErrorInfo instances.
|
|
|
|
* @returns {string} Fixed content.
|
|
|
|
*/
|
|
|
|
export function applyFixes(input: string, errors: RuleOnErrorInfo[]): string;
|
|
|
|
/**
|
|
|
|
* Gets the (semantic) version of the library.
|
|
|
|
*
|
|
|
|
* @returns {string} SemVer string.
|
|
|
|
*/
|
|
|
|
export function getVersion(): string;
|
2025-04-20 04:57:35 +00:00
|
|
|
/**
|
|
|
|
* Result object for getEnabledRulesPerLineNumber.
|
|
|
|
*/
|
|
|
|
export type EnabledRulesPerLineNumberResult = {
|
|
|
|
/**
|
|
|
|
* Effective configuration.
|
|
|
|
*/
|
|
|
|
effectiveConfig: Configuration;
|
|
|
|
/**
|
|
|
|
* Enabled rules per line number.
|
|
|
|
*/
|
|
|
|
enabledRulesPerLineNumber: any[];
|
|
|
|
/**
|
|
|
|
* Enabled rule list.
|
|
|
|
*/
|
|
|
|
enabledRuleList: Rule[];
|
|
|
|
};
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Function to implement rule logic.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type RuleFunction = (params: RuleParams, onError: RuleOnError) => void;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Rule parameters.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type RuleParams = {
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* File/string name.
|
|
|
|
*/
|
|
|
|
name: string;
|
2024-02-27 20:42:09 -08:00
|
|
|
/**
|
|
|
|
* Markdown parser data.
|
|
|
|
*/
|
|
|
|
parsers: MarkdownParsers;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* File/string lines.
|
|
|
|
*/
|
2024-03-09 16:17:50 -08:00
|
|
|
lines: readonly string[];
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Front matter lines.
|
|
|
|
*/
|
2024-03-09 16:17:50 -08:00
|
|
|
frontMatterLines: readonly string[];
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Rule configuration.
|
|
|
|
*/
|
2020-09-13 12:58:09 -07:00
|
|
|
config: RuleConfiguration;
|
2024-09-29 18:11:41 -07:00
|
|
|
/**
|
|
|
|
* Version of the markdownlint library.
|
|
|
|
*/
|
|
|
|
version: string;
|
2019-11-10 19:26:55 -08:00
|
|
|
};
|
|
|
|
/**
|
2024-02-27 20:42:09 -08:00
|
|
|
* Markdown parser data.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type MarkdownParsers = {
|
2024-02-27 20:42:09 -08:00
|
|
|
/**
|
2024-03-09 16:17:50 -08:00
|
|
|
* Markdown parser data from markdown-it (only present when Rule.parser is "markdownit").
|
2024-02-27 20:42:09 -08:00
|
|
|
*/
|
|
|
|
markdownit: ParserMarkdownIt;
|
2024-03-09 16:17:50 -08:00
|
|
|
/**
|
|
|
|
* Markdown parser data from micromark (only present when Rule.parser is "micromark").
|
|
|
|
*/
|
|
|
|
micromark: ParserMicromark;
|
2024-02-27 20:42:09 -08:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Markdown parser data from markdown-it.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type ParserMarkdownIt = {
|
2024-02-27 20:42:09 -08:00
|
|
|
/**
|
|
|
|
* Token objects from markdown-it.
|
|
|
|
*/
|
|
|
|
tokens: MarkdownItToken[];
|
|
|
|
};
|
2024-03-09 16:17:50 -08:00
|
|
|
/**
|
|
|
|
* Markdown parser data from micromark.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type ParserMicromark = {
|
2024-03-09 16:17:50 -08:00
|
|
|
/**
|
|
|
|
* Token objects from micromark.
|
|
|
|
*/
|
|
|
|
tokens: MicromarkToken[];
|
|
|
|
};
|
2024-02-27 20:42:09 -08:00
|
|
|
/**
|
|
|
|
* markdown-it token.
|
2019-11-10 19:26:55 -08:00
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type MarkdownItToken = {
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* HTML attributes.
|
|
|
|
*/
|
|
|
|
attrs: string[][];
|
|
|
|
/**
|
|
|
|
* Block-level token.
|
|
|
|
*/
|
|
|
|
block: boolean;
|
|
|
|
/**
|
|
|
|
* Child nodes.
|
|
|
|
*/
|
|
|
|
children: MarkdownItToken[];
|
|
|
|
/**
|
|
|
|
* Tag contents.
|
|
|
|
*/
|
|
|
|
content: string;
|
|
|
|
/**
|
|
|
|
* Ignore element.
|
|
|
|
*/
|
|
|
|
hidden: boolean;
|
|
|
|
/**
|
|
|
|
* Fence info.
|
|
|
|
*/
|
|
|
|
info: string;
|
|
|
|
/**
|
|
|
|
* Nesting level.
|
|
|
|
*/
|
|
|
|
level: number;
|
|
|
|
/**
|
|
|
|
* Beginning/ending line numbers.
|
|
|
|
*/
|
|
|
|
map: number[];
|
|
|
|
/**
|
|
|
|
* Markup text.
|
|
|
|
*/
|
|
|
|
markup: string;
|
|
|
|
/**
|
|
|
|
* Arbitrary data.
|
|
|
|
*/
|
|
|
|
meta: any;
|
|
|
|
/**
|
|
|
|
* Level change.
|
|
|
|
*/
|
|
|
|
nesting: number;
|
|
|
|
/**
|
|
|
|
* HTML tag name.
|
|
|
|
*/
|
|
|
|
tag: string;
|
|
|
|
/**
|
|
|
|
* Token type.
|
|
|
|
*/
|
|
|
|
type: string;
|
2019-11-11 21:09:37 -08:00
|
|
|
/**
|
|
|
|
* Line number (1-based).
|
|
|
|
*/
|
|
|
|
lineNumber: number;
|
|
|
|
/**
|
|
|
|
* Line content.
|
|
|
|
*/
|
|
|
|
line: string;
|
2019-11-10 19:26:55 -08:00
|
|
|
};
|
2024-11-28 20:36:44 -08:00
|
|
|
export type MicromarkTokenType = import("micromark-util-types").TokenType;
|
2024-03-09 16:17:50 -08:00
|
|
|
/**
|
|
|
|
* micromark token.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type MicromarkToken = {
|
2024-03-09 16:17:50 -08:00
|
|
|
/**
|
|
|
|
* Token type.
|
|
|
|
*/
|
|
|
|
type: MicromarkTokenType;
|
|
|
|
/**
|
|
|
|
* Start line (1-based).
|
|
|
|
*/
|
|
|
|
startLine: number;
|
|
|
|
/**
|
|
|
|
* Start column (1-based).
|
|
|
|
*/
|
|
|
|
startColumn: number;
|
|
|
|
/**
|
|
|
|
* End line (1-based).
|
|
|
|
*/
|
|
|
|
endLine: number;
|
|
|
|
/**
|
|
|
|
* End column (1-based).
|
|
|
|
*/
|
|
|
|
endColumn: number;
|
|
|
|
/**
|
|
|
|
* Token text.
|
|
|
|
*/
|
|
|
|
text: string;
|
|
|
|
/**
|
|
|
|
* Child tokens.
|
|
|
|
*/
|
|
|
|
children: MicromarkToken[];
|
|
|
|
/**
|
|
|
|
* Parent token.
|
|
|
|
*/
|
|
|
|
parent: MicromarkToken | null;
|
|
|
|
};
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Error-reporting callback.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type RuleOnError = (onErrorInfo: RuleOnErrorInfo) => void;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Fix information for RuleOnError callback.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type RuleOnErrorInfo = {
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Line number (1-based).
|
|
|
|
*/
|
|
|
|
lineNumber: number;
|
|
|
|
/**
|
2021-09-25 16:23:37 -07:00
|
|
|
* Detail about the error.
|
2019-11-10 19:26:55 -08:00
|
|
|
*/
|
2021-09-25 16:23:37 -07:00
|
|
|
detail?: string;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Context for the error.
|
|
|
|
*/
|
|
|
|
context?: string;
|
2023-07-11 21:44:45 -07:00
|
|
|
/**
|
|
|
|
* Link to more information.
|
|
|
|
*/
|
|
|
|
information?: URL;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Column number (1-based) and length.
|
|
|
|
*/
|
|
|
|
range?: number[];
|
|
|
|
/**
|
|
|
|
* Fix information.
|
|
|
|
*/
|
|
|
|
fixInfo?: RuleOnErrorFixInfo;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Fix information for RuleOnErrorInfo.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type RuleOnErrorFixInfo = {
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Line number (1-based).
|
|
|
|
*/
|
|
|
|
lineNumber?: number;
|
|
|
|
/**
|
|
|
|
* Column of the fix (1-based).
|
|
|
|
*/
|
|
|
|
editColumn?: number;
|
|
|
|
/**
|
|
|
|
* Count of characters to delete.
|
|
|
|
*/
|
|
|
|
deleteCount?: number;
|
|
|
|
/**
|
|
|
|
* Text to insert (after deleting).
|
|
|
|
*/
|
|
|
|
insertText?: string;
|
|
|
|
};
|
2024-10-06 17:24:44 -07:00
|
|
|
/**
|
|
|
|
* RuleOnErrorInfo with all optional properties present.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type RuleOnErrorFixInfoNormalized = {
|
2024-10-06 17:24:44 -07:00
|
|
|
/**
|
|
|
|
* Line number (1-based).
|
|
|
|
*/
|
|
|
|
lineNumber: number;
|
|
|
|
/**
|
|
|
|
* Column of the fix (1-based).
|
|
|
|
*/
|
|
|
|
editColumn: number;
|
|
|
|
/**
|
|
|
|
* Count of characters to delete.
|
|
|
|
*/
|
|
|
|
deleteCount: number;
|
|
|
|
/**
|
|
|
|
* Text to insert (after deleting).
|
|
|
|
*/
|
|
|
|
insertText: string;
|
|
|
|
};
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Rule definition.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type Rule = {
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Rule name(s).
|
|
|
|
*/
|
|
|
|
names: string[];
|
|
|
|
/**
|
|
|
|
* Rule description.
|
|
|
|
*/
|
|
|
|
description: string;
|
|
|
|
/**
|
|
|
|
* Link to more information.
|
|
|
|
*/
|
|
|
|
information?: URL;
|
|
|
|
/**
|
|
|
|
* Rule tag(s).
|
|
|
|
*/
|
|
|
|
tags: string[];
|
2024-03-09 16:17:50 -08:00
|
|
|
/**
|
|
|
|
* Parser used.
|
|
|
|
*/
|
|
|
|
parser: "markdownit" | "micromark" | "none";
|
2021-12-11 21:44:25 -08:00
|
|
|
/**
|
|
|
|
* True if asynchronous.
|
|
|
|
*/
|
|
|
|
asynchronous?: boolean;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Rule implementation.
|
|
|
|
*/
|
|
|
|
function: RuleFunction;
|
|
|
|
};
|
2024-12-25 20:42:32 -08:00
|
|
|
/**
|
|
|
|
* Method used by the markdown-it parser to parse input.
|
|
|
|
*/
|
|
|
|
export type MarkdownItParse = (src: string, env: any) => any[];
|
|
|
|
/**
|
|
|
|
* Instance of the markdown-it parser.
|
|
|
|
*/
|
|
|
|
export type MarkdownIt = {
|
|
|
|
/**
|
|
|
|
* Method to parse input.
|
|
|
|
*/
|
|
|
|
parse: MarkdownItParse;
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Gets an instance of the markdown-it parser. Any plugins should already have been loaded.
|
|
|
|
*/
|
2024-12-27 21:22:14 -08:00
|
|
|
export type MarkdownItFactory = () => MarkdownIt | Promise<MarkdownIt>;
|
2024-06-21 20:37:17 -07:00
|
|
|
/**
|
|
|
|
* Configuration options.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type Options = {
|
2024-06-21 20:37:17 -07:00
|
|
|
/**
|
|
|
|
* Configuration object.
|
|
|
|
*/
|
|
|
|
config?: Configuration;
|
|
|
|
/**
|
|
|
|
* Configuration parsers.
|
|
|
|
*/
|
|
|
|
configParsers?: ConfigurationParser[];
|
|
|
|
/**
|
|
|
|
* Custom rules.
|
|
|
|
*/
|
|
|
|
customRules?: Rule[] | Rule;
|
|
|
|
/**
|
|
|
|
* Files to lint.
|
|
|
|
*/
|
|
|
|
files?: string[] | string;
|
|
|
|
/**
|
|
|
|
* Front matter pattern.
|
|
|
|
*/
|
|
|
|
frontMatter?: RegExp | null;
|
|
|
|
/**
|
|
|
|
* File system implementation.
|
|
|
|
*/
|
|
|
|
fs?: any;
|
|
|
|
/**
|
|
|
|
* True to catch exceptions.
|
|
|
|
*/
|
|
|
|
handleRuleFailures?: boolean;
|
|
|
|
/**
|
2024-12-25 20:42:32 -08:00
|
|
|
* Function to create a markdown-it parser.
|
2024-06-21 20:37:17 -07:00
|
|
|
*/
|
2024-12-25 20:42:32 -08:00
|
|
|
markdownItFactory?: MarkdownItFactory;
|
2024-06-21 20:37:17 -07:00
|
|
|
/**
|
|
|
|
* True to ignore HTML directives.
|
|
|
|
*/
|
|
|
|
noInlineConfig?: boolean;
|
|
|
|
/**
|
|
|
|
* Results object version.
|
|
|
|
*/
|
|
|
|
resultVersion?: number;
|
|
|
|
/**
|
|
|
|
* Strings to lint.
|
|
|
|
*/
|
|
|
|
strings?: {
|
|
|
|
[x: string]: string;
|
|
|
|
};
|
|
|
|
};
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
2020-11-24 16:37:11 -08:00
|
|
|
* A markdown-it plugin.
|
2019-11-10 19:26:55 -08:00
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type Plugin = any[];
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Function to pretty-print lint results.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type ToStringCallback = (ruleAliases?: boolean) => string;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Lint results (for resultVersion 3).
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type LintResults = {
|
2019-11-10 19:26:55 -08:00
|
|
|
[x: string]: LintError[];
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Lint error.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type LintError = {
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Line number (1-based).
|
|
|
|
*/
|
|
|
|
lineNumber: number;
|
|
|
|
/**
|
|
|
|
* Rule name(s).
|
|
|
|
*/
|
|
|
|
ruleNames: string[];
|
|
|
|
/**
|
|
|
|
* Rule description.
|
|
|
|
*/
|
|
|
|
ruleDescription: string;
|
|
|
|
/**
|
|
|
|
* Link to more information.
|
|
|
|
*/
|
|
|
|
ruleInformation: string;
|
|
|
|
/**
|
|
|
|
* Detail about the error.
|
|
|
|
*/
|
|
|
|
errorDetail: string;
|
|
|
|
/**
|
|
|
|
* Context for the error.
|
|
|
|
*/
|
|
|
|
errorContext: string;
|
|
|
|
/**
|
|
|
|
* Column number (1-based) and length.
|
|
|
|
*/
|
|
|
|
errorRange: number[];
|
|
|
|
/**
|
|
|
|
* Fix information.
|
|
|
|
*/
|
2021-01-10 20:46:00 -08:00
|
|
|
fixInfo?: FixInfo;
|
2019-11-10 19:26:55 -08:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Fix information.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type FixInfo = {
|
2021-06-14 22:30:35 -07:00
|
|
|
/**
|
|
|
|
* Line number (1-based).
|
|
|
|
*/
|
|
|
|
lineNumber?: number;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Column of the fix (1-based).
|
|
|
|
*/
|
|
|
|
editColumn?: number;
|
|
|
|
/**
|
|
|
|
* Count of characters to delete.
|
|
|
|
*/
|
|
|
|
deleteCount?: number;
|
|
|
|
/**
|
|
|
|
* Text to insert (after deleting).
|
|
|
|
*/
|
|
|
|
insertText?: string;
|
|
|
|
};
|
2023-09-04 21:41:16 -07:00
|
|
|
/**
|
|
|
|
* Called with the result of linting a string or document.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type LintContentCallback = (error: Error | null, result?: LintError[]) => void;
|
2024-06-21 20:37:17 -07:00
|
|
|
/**
|
|
|
|
* Called with the result of the lint function.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type LintCallback = (error: Error | null, results?: LintResults) => void;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
2023-11-08 19:49:02 -08:00
|
|
|
* Configuration object for linting rules. For the JSON schema, see
|
Update dependencies: c8 to 7.11.3, eslint to 8.18.0, eslint-plugin-jsdoc to 39.3.3, eslint-plugin-unicorn to 42.0.0, globby to 13.1.2, markdown-it-texmath to 1.0.0, markdownlint-rule-helpers to 0.16.0, ts-loader to 9.3.0, typescript to 4.7.4, webpack to 5.73.0, webpack-cli to 4.10.0.
2022-06-20 04:41:08 +00:00
|
|
|
* {@link ../schema/markdownlint-config-schema.json}.
|
2019-11-10 19:26:55 -08:00
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type Configuration = import("./configuration.d.ts").Configuration;
|
2024-08-27 20:47:33 -07:00
|
|
|
/**
|
|
|
|
* Configuration object for linting rules strictly. For the JSON schema, see
|
|
|
|
* {@link ../schema/markdownlint-config-schema-strict.json}.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type ConfigurationStrict = import("./configuration-strict.d.ts").ConfigurationStrict;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Rule configuration.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type RuleConfiguration = boolean | any;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Parses a configuration string and returns a configuration object.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type ConfigurationParser = (text: string) => Configuration;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
2021-08-12 20:43:18 -07:00
|
|
|
* Called with the result of the readConfig function.
|
2019-11-10 19:26:55 -08:00
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type ReadConfigCallback = (err: Error | null, config?: Configuration) => void;
|
2021-08-12 20:43:18 -07:00
|
|
|
/**
|
|
|
|
* Called with the result of the resolveConfigExtends function.
|
|
|
|
*/
|
2024-11-28 20:36:44 -08:00
|
|
|
export type ResolveConfigExtendsCallback = (err: Error | null, path?: string) => void;
|