mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Add comprehensive tests for parseConfiguration function, handle non-object parser results consistently (fixes #1523).
This commit is contained in:
parent
1f237e6c54
commit
63147ee1eb
4 changed files with 97 additions and 11 deletions
|
|
@ -1183,6 +1183,7 @@ export function readConfigSync(file, parsers, fs) {
|
|||
// Try to parse file
|
||||
const { config, message } = parseConfiguration(file, content, parsers);
|
||||
if (!config) {
|
||||
// @ts-ignore
|
||||
throw new Error(message);
|
||||
}
|
||||
// Extend configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue