mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22: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
11
lib/md007.js
11
lib/md007.js
|
|
@ -25,13 +25,14 @@ module.exports = {
|
|||
const indent = Number(params.config.indent || 2);
|
||||
const startIndented = !!params.config.start_indented;
|
||||
const startIndent = Number(params.config.start_indent || indent);
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @type import("../helpers/micromark.cjs").Token[] */
|
||||
const micromarkTokens =
|
||||
// @ts-ignore
|
||||
params.parsers.micromark.tokens;
|
||||
const unorderedListNesting = new Map();
|
||||
let lastBlockQuotePrefix = null;
|
||||
const tokens = filterByTypes(
|
||||
// eslint-disable-next-line dot-notation
|
||||
params.parsers["micromark"].tokens,
|
||||
unorderedListTypes
|
||||
);
|
||||
const tokens = filterByTypes(micromarkTokens, unorderedListTypes);
|
||||
for (const token of tokens) {
|
||||
const { endColumn, parent, startColumn, startLine, type } = token;
|
||||
if (type === "blockQuotePrefix") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue