Tweak rule parameters to avoid confusing the TypeScript type system.

This commit is contained in:
David Anson 2023-11-03 20:09:06 -07:00
parent 7dc50c125f
commit 1a376f60bb
2 changed files with 5 additions and 4 deletions

View file

@ -25,7 +25,8 @@ module.exports = {
"names": [ "MD054", "link-image-style" ],
"description": "Link and image style",
"tags": [ "images", "links" ],
"function": ({ parsers, config }, onError) => {
"function": (params, onError) => {
const { parsers, config } = params;
const autolink = (config.autolink === undefined) || !!config.autolink;
const inline = (config.inline === undefined) || !!config.inline;
const reference = (config.reference === undefined) || !!config.reference;