mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-20 16:00:13 +01:00
Update all rules to better handle wrongly-typed configuration parameters.
This commit is contained in:
parent
26ad0550ec
commit
3238ed4249
25 changed files with 134 additions and 39 deletions
|
|
@ -10,10 +10,10 @@ module.exports = {
|
|||
"description": "Spaces after list markers",
|
||||
"tags": [ "ol", "ul", "whitespace" ],
|
||||
"function": function MD030(params, onError) {
|
||||
const ulSingle = params.config.ul_single || 1;
|
||||
const olSingle = params.config.ol_single || 1;
|
||||
const ulMulti = params.config.ul_multi || 1;
|
||||
const olMulti = params.config.ol_multi || 1;
|
||||
const ulSingle = Number(params.config.ul_single || 1);
|
||||
const olSingle = Number(params.config.ol_single || 1);
|
||||
const ulMulti = Number(params.config.ul_multi || 1);
|
||||
const olMulti = Number(params.config.ol_multi || 1);
|
||||
flattenedLists().forEach((list) => {
|
||||
const lineCount = list.lastLineIndex - list.open.map[0];
|
||||
const allSingle = lineCount === list.items.length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue