2019-11-10 19:26:55 -08:00
|
|
|
export = markdownlint;
|
|
|
|
/**
|
|
|
|
* Lint specified Markdown files.
|
|
|
|
*
|
2023-01-29 21:13:17 -08:00
|
|
|
* @param {Options | null} options Configuration options.
|
2019-11-10 19:26:55 -08:00
|
|
|
* @param {LintCallback} callback Callback (err, result) function.
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
2023-01-29 21:13:17 -08:00
|
|
|
declare function markdownlint(options: Options | null, callback: LintCallback): void;
|
2019-11-10 19:26:55 -08:00
|
|
|
declare namespace markdownlint {
|
2024-10-06 17:24:44 -07:00
|
|
|
export { markdownlintSync as sync, readConfig, readConfigSync, getVersion, promises, applyFix, applyFixes, RuleFunction, RuleParams, MarkdownParsers, ParserMarkdownIt, ParserMicromark, MarkdownItToken, MicromarkTokenType, MicromarkToken, RuleOnError, RuleOnErrorInfo, RuleOnErrorFixInfo, RuleOnErrorFixInfoNormalized, Rule, Options, Plugin, ToStringCallback, LintResults, LintError, FixInfo, LintContentCallback, LintCallback, Configuration, ConfigurationStrict, RuleConfiguration, ConfigurationParser, ReadConfigCallback, ResolveConfigExtendsCallback };
|
2019-11-10 19:26:55 -08:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Lint specified Markdown files synchronously.
|
|
|
|
*
|
2023-01-29 21:13:17 -08:00
|
|
|
* @param {Options | null} options Configuration options.
|
2019-11-10 19:26:55 -08:00
|
|
|
* @returns {LintResults} Results object.
|
|
|
|
*/
|
2023-01-29 21:13:17 -08:00
|
|
|
declare function markdownlintSync(options: Options | null): LintResults;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Read specified configuration file.
|
|
|
|
*
|
|
|
|
* @param {string} file Configuration file name.
|
2020-01-11 20:48:00 -08:00
|
|
|
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing
|
2020-01-19 21:01:11 -08:00
|
|
|
* function(s).
|
2021-08-12 19:38:03 -07:00
|
|
|
* @param {Object} [fs] File system implementation.
|
2020-01-11 20:48:00 -08:00
|
|
|
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
2019-11-10 19:26:55 -08:00
|
|
|
* @returns {void}
|
|
|
|
*/
|
2021-08-12 19:38:03 -07:00
|
|
|
declare function readConfig(file: string, parsers: ConfigurationParser[] | ReadConfigCallback, fs?: any, callback?: ReadConfigCallback): void;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Read specified configuration file synchronously.
|
|
|
|
*
|
|
|
|
* @param {string} file Configuration file name.
|
|
|
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
2021-08-12 19:38:03 -07:00
|
|
|
* @param {Object} [fs] File system implementation.
|
2019-11-10 19:26:55 -08:00
|
|
|
* @returns {Configuration} Configuration object.
|
2021-08-22 18:03:26 -07:00
|
|
|
* @throws An Error if processing fails.
|
2019-11-10 19:26:55 -08:00
|
|
|
*/
|
2021-08-12 19:38:03 -07:00
|
|
|
declare function readConfigSync(file: string, parsers?: ConfigurationParser[], fs?: any): Configuration;
|
2020-10-17 14:17:35 -07:00
|
|
|
/**
|
|
|
|
* Gets the (semantic) version of the library.
|
|
|
|
*
|
|
|
|
* @returns {string} SemVer string.
|
|
|
|
*/
|
|
|
|
declare function getVersion(): string;
|
2020-09-13 12:58:09 -07:00
|
|
|
declare namespace promises {
|
|
|
|
export { markdownlintPromise as markdownlint };
|
2023-04-03 22:59:06 -07:00
|
|
|
export { extendConfigPromise as extendConfig };
|
2020-09-13 12:58:09 -07:00
|
|
|
export { readConfigPromise as readConfig };
|
|
|
|
}
|
2024-10-06 17:24:44 -07:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
declare 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.
|
|
|
|
*/
|
|
|
|
declare function applyFixes(input: string, errors: RuleOnErrorInfo[]): string;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Function to implement rule logic.
|
|
|
|
*/
|
|
|
|
type RuleFunction = (params: RuleParams, onError: RuleOnError) => void;
|
|
|
|
/**
|
|
|
|
* Rule parameters.
|
|
|
|
*/
|
|
|
|
type RuleParams = {
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
type MarkdownParsers = {
|
|
|
|
/**
|
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.
|
|
|
|
*/
|
|
|
|
type ParserMarkdownIt = {
|
|
|
|
/**
|
|
|
|
* Token objects from markdown-it.
|
|
|
|
*/
|
|
|
|
tokens: MarkdownItToken[];
|
|
|
|
};
|
2024-03-09 16:17:50 -08:00
|
|
|
/**
|
|
|
|
* Markdown parser data from micromark.
|
|
|
|
*/
|
|
|
|
type ParserMicromark = {
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
*/
|
|
|
|
type MarkdownItToken = {
|
|
|
|
/**
|
|
|
|
* 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-03-09 16:17:50 -08:00
|
|
|
type MicromarkTokenType = import("markdownlint-micromark").TokenType;
|
|
|
|
/**
|
|
|
|
* micromark token.
|
|
|
|
*/
|
|
|
|
type MicromarkToken = {
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
type RuleOnError = (onErrorInfo: RuleOnErrorInfo) => void;
|
|
|
|
/**
|
|
|
|
* Fix information for RuleOnError callback.
|
|
|
|
*/
|
|
|
|
type RuleOnErrorInfo = {
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
type RuleOnErrorFixInfo = {
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
type RuleOnErrorFixInfoNormalized = {
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
type Rule = {
|
|
|
|
/**
|
|
|
|
* 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-06-21 20:37:17 -07:00
|
|
|
/**
|
|
|
|
* Configuration options.
|
|
|
|
*/
|
|
|
|
type Options = {
|
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
/**
|
|
|
|
* Additional plugins.
|
|
|
|
*/
|
|
|
|
markdownItPlugins?: Plugin[];
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
*/
|
|
|
|
type Plugin = any[];
|
|
|
|
/**
|
|
|
|
* Function to pretty-print lint results.
|
|
|
|
*/
|
|
|
|
type ToStringCallback = (ruleAliases?: boolean) => string;
|
|
|
|
/**
|
|
|
|
* Lint results (for resultVersion 3).
|
|
|
|
*/
|
|
|
|
type LintResults = {
|
|
|
|
[x: string]: LintError[];
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Lint error.
|
|
|
|
*/
|
|
|
|
type LintError = {
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
type LintContentCallback = (error: Error | null, result?: LintError[]) => void;
|
2024-06-21 20:37:17 -07:00
|
|
|
/**
|
|
|
|
* Called with the result of the lint function.
|
|
|
|
*/
|
|
|
|
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
|
|
|
*/
|
2023-11-08 19:49:02 -08:00
|
|
|
type Configuration = import("./configuration").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}.
|
|
|
|
*/
|
|
|
|
type ConfigurationStrict = import("./configuration-strict").ConfigurationStrict;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Rule configuration.
|
|
|
|
*/
|
Update dependencies: c8 to 7.7.2, eslint to 7.28.0, eslint-plugin-jsdoc to 35.1.3, eslint-plugin-unicorn to 33.0.1, globby to 11.0.3, js-yaml to 4.1.0, markdown-it-texmath to 0.9.0, markdownlint-rule-helpers to 0.14.0, ts-loader to 9.2.3, typescript to 4.3.2, webpack to 5.38.1, webpack-cli to 4.7.2.
2021-06-08 22:20:13 -07:00
|
|
|
type RuleConfiguration = boolean | any;
|
2019-11-10 19:26:55 -08:00
|
|
|
/**
|
|
|
|
* Parses a configuration string and returns a configuration object.
|
|
|
|
*/
|
2020-09-13 12:58:09 -07:00
|
|
|
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
|
|
|
*/
|
2020-09-13 12:58:09 -07:00
|
|
|
type ReadConfigCallback = (err: Error | null, config?: Configuration) => void;
|
2021-08-12 20:43:18 -07:00
|
|
|
/**
|
|
|
|
* Called with the result of the resolveConfigExtends function.
|
|
|
|
*/
|
|
|
|
type ResolveConfigExtendsCallback = (err: Error | null, path?: string) => void;
|
2020-09-13 12:58:09 -07:00
|
|
|
/**
|
|
|
|
* Lint specified Markdown files.
|
|
|
|
*
|
|
|
|
* @param {Options} options Configuration options.
|
|
|
|
* @returns {Promise<LintResults>} Results object.
|
|
|
|
*/
|
|
|
|
declare function markdownlintPromise(options: Options): Promise<LintResults>;
|
2023-04-03 22:59:06 -07:00
|
|
|
/**
|
|
|
|
* Extend specified configuration object.
|
|
|
|
*
|
|
|
|
* @param {Configuration} config Configuration object.
|
|
|
|
* @param {string} file Configuration file name.
|
|
|
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
|
|
|
* @param {Object} [fs] File system implementation.
|
|
|
|
* @returns {Promise<Configuration>} Configuration object.
|
|
|
|
*/
|
|
|
|
declare function extendConfigPromise(config: Configuration, file: string, parsers?: ConfigurationParser[], fs?: any): Promise<Configuration>;
|
2020-09-13 12:58:09 -07:00
|
|
|
/**
|
|
|
|
* Read specified configuration file.
|
|
|
|
*
|
|
|
|
* @param {string} file Configuration file name.
|
|
|
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
2021-08-12 19:38:03 -07:00
|
|
|
* @param {Object} [fs] File system implementation.
|
2020-09-13 12:58:09 -07:00
|
|
|
* @returns {Promise<Configuration>} Configuration object.
|
|
|
|
*/
|
2021-08-12 19:38:03 -07:00
|
|
|
declare function readConfigPromise(file: string, parsers?: ConfigurationParser[], fs?: any): Promise<Configuration>;
|