mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 08:20:12 +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
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
"description": "First line in file should be a top level heading",
|
||||
"tags": [ "headings", "headers" ],
|
||||
"function": function MD041(params, onError) {
|
||||
const level = params.config.level || 1;
|
||||
const level = Number(params.config.level || 1);
|
||||
const tag = "h" + level;
|
||||
const foundFrontMatterTitle =
|
||||
frontMatterHasTitle(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue