Create strict JSON Schema for configuration (standalone for ease of use) and corresponding strict TypeScript type (via extends for conciseness) (fixes #1248).

This commit is contained in:
David Anson 2024-08-27 20:47:33 -07:00
parent bbca3ad209
commit 9c8e7156e1
10 changed files with 3070 additions and 1207 deletions

View file

@ -164,3 +164,20 @@ markdownlint(options, assertLintResultsCallback);
(async () => {
assertLintResultsCallback(null, await markdownlint.promises.markdownlint(options));
})();
const configuration: markdownlint.Configuration = {
"custom-rule": true,
"no-hard-tabs": false,
"heading-style": {
"style": "consistent"
}
};
assert(configuration);
const configurationStrict: markdownlint.ConfigurationStrict = {
// "custom-rule": true,
"no-hard-tabs": false,
"heading-style": {
"style": "consistent"
}
};
assert(configurationStrict);