Add "configParsers" option so custom parsers can be used to handle the content of markdownlint-configure-file inline comments (fixes #528).

This commit is contained in:
David Anson 2022-06-05 22:32:22 -07:00
parent bbec8c5c1e
commit 00082ee8a5
6 changed files with 267 additions and 108 deletions

36
lib/markdownlint.d.ts vendored
View file

@ -14,32 +14,38 @@ declare namespace markdownlint {
* Configuration options.
*/
type Options = {
/**
* Files to lint.
*/
files?: string[] | string;
/**
* Strings to lint.
*/
strings?: {
[x: string]: string;
};
/**
* Configuration object.
*/
config?: Configuration;
/**
* Configuration parsers.
*/
configParsers?: ConfigurationParser[];
/**
* Custom rules.
*/
customRules?: Rule[] | Rule;
/**
* Files to lint.
*/
files?: string[] | string;
/**
* Front matter pattern.
*/
frontMatter?: RegExp;
/**
* File system implementation.
*/
fs?: any;
/**
* True to catch exceptions.
*/
handleRuleFailures?: boolean;
/**
* Additional plugins.
*/
markdownItPlugins?: Plugin[];
/**
* True to ignore HTML directives.
*/
@ -49,13 +55,11 @@ type Options = {
*/
resultVersion?: number;
/**
* Additional plugins.
* Strings to lint.
*/
markdownItPlugins?: Plugin[];
/**
* File system implementation.
*/
fs?: any;
strings?: {
[x: string]: string;
};
};
/**
* Called with the result of the lint function.