mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30: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
|
|
@ -10,7 +10,8 @@ module.exports = {
|
|||
"description": "Proper names should have the correct capitalization",
|
||||
"tags": [ "spelling" ],
|
||||
"function": function MD044(params, onError) {
|
||||
const names = params.config.names || [];
|
||||
let names = params.config.names;
|
||||
names = Array.isArray(names) ? names : [];
|
||||
const codeBlocks = params.config.code_blocks;
|
||||
const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
||||
names.forEach((name) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue