diff --git a/package.json b/package.json index 649ea1a..0f58f02 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,13 @@ "index.js" ], "devDependencies": { - "@types/mdast": "^3.0.0", + "@types/mdast": "^4.0.0", "@types/node": "^20.0.0", "alpha-sort": "^5.0.0", "c8": "^8.0.0", "html-element-attributes": "^3.0.0", "html-event-attributes": "^2.0.0", - "mdast-zone": "^5.0.0", + "mdast-zone": "^6.0.0", "prettier": "^3.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", @@ -49,7 +49,7 @@ "type-coverage": "^2.0.0", "typescript": "^5.0.0", "undici": "^5.0.0", - "unist-builder": "^3.0.0", + "unist-builder": "^4.0.0", "xo": "^0.56.0" }, "scripts": { diff --git a/script/list.js b/script/list.js index d31cc04..3352baf 100644 --- a/script/list.js +++ b/script/list.js @@ -1,7 +1,8 @@ /** - * @typedef {import('mdast').TableRow} TableRow - * @typedef {import('mdast').RowContent} RowContent * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').RowContent} RowContent + * @typedef {import('mdast').TableRow} TableRow */ import {u} from 'unist-builder' @@ -17,10 +18,13 @@ import {merge} from '../lib/util/merge.js' const schemas = [xml, xlink, xmlns, svg, html, aria] const all = merge(schemas) -/** - * @type {import('unified').Plugin} - */ export default function remarkList() { + /** + * @param {Root} tree + * Tree. + * @returns {undefined} + * Nothing. + */ return (tree) => { zone(tree, 'list', (start, _, end) => { const properties = all.property