mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-28 11:38:48 +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
|
|
@ -14,8 +14,12 @@ module.exports = {
|
|||
"description": "Table column count",
|
||||
"tags": [ "table" ],
|
||||
"function": function MD056(params, onError) {
|
||||
// eslint-disable-next-line dot-notation
|
||||
const tables = filterByTypes(params.parsers["micromark"].tokens, [ "table" ]);
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @type import("../helpers/micromark.cjs").Token[] */
|
||||
const micromarkTokens =
|
||||
// @ts-ignore
|
||||
params.parsers.micromark.tokens;
|
||||
const tables = filterByTypes(micromarkTokens, [ "table" ]);
|
||||
for (const table of tables) {
|
||||
const rows = filterByTypes(table.children, [ "tableDelimiterRow", "tableRow" ]);
|
||||
let expectedCount = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue