mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-24 01:40:13 +01:00
Use @type to provide typing for all instances of params.parsers.micromark.tokens.
This commit is contained in:
parent
aee8c2d1d3
commit
828ae3541a
23 changed files with 284 additions and 160 deletions
|
|
@ -13,9 +13,13 @@ module.exports = {
|
|||
"tags": [ "code" ],
|
||||
"function": function MD048(params, onError) {
|
||||
const style = String(params.config.style || "consistent");
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @type import("../helpers/micromark.cjs").Token[] */
|
||||
const micromarkTokens =
|
||||
// @ts-ignore
|
||||
params.parsers.micromark.tokens;
|
||||
let expectedStyle = style;
|
||||
// eslint-disable-next-line dot-notation
|
||||
const codeFenceds = filterByTypes(params.parsers["micromark"].tokens, [ "codeFenced" ]);
|
||||
const codeFenceds = filterByTypes(micromarkTokens, [ "codeFenced" ]);
|
||||
for (const codeFenced of codeFenceds) {
|
||||
const codeFencedFence = tokenIfType(codeFenced.children[0], "codeFencedFence");
|
||||
if (codeFencedFence) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue