diff --git a/package.json b/package.json index d286327..5154f10 100644 --- a/package.json +++ b/package.json @@ -38,11 +38,11 @@ "tape": "^5.0.0", "to-vfile": "^7.0.0", "type-coverage": "^2.0.0", - "typescript": "^4.0.0", + "typescript": "^5.0.0", "unified": "^10.0.0", "unist-builder": "^3.0.0", "unist-util-remove-position": "^4.0.0", - "xo": "^0.52.0" + "xo": "^0.54.0" }, "scripts": { "build": "npm run build --workspaces", @@ -60,11 +60,14 @@ "trailingComma": "none" }, "xo": { - "prettier": true + "prettier": true, + "rules": { + "unicorn/prefer-logical-operator-over-ternary": "off" + } }, "remarkConfig": { "plugins": [ - "preset-wooorm" + "remark-preset-wooorm" ] }, "typeCoverage": { diff --git a/packages/remark-math/index.js b/packages/remark-math/index.js index 85fcd02..9d11d7a 100644 --- a/packages/remark-math/index.js +++ b/packages/remark-math/index.js @@ -11,6 +11,7 @@ import {mathFromMarkdown, mathToMarkdown} from 'mdast-util-math' /** * Plugin to support math. * + * @this {import('unified').Processor} * @type {import('unified').Plugin<[Options?] | void[], Root, Root>} */ export default function remarkMath(options = {}) { @@ -25,7 +26,7 @@ export default function remarkMath(options = {}) { * @param {unknown} value */ function add(field, value) { - const list = /** @type {unknown[]} */ ( + const list = /** @type {Array} */ ( // Other extensions /* c8 ignore next 2 */ data[field] ? data[field] : (data[field] = []) diff --git a/packages/remark-math/readme.md b/packages/remark-math/readme.md index d814308..0826258 100644 --- a/packages/remark-math/readme.md +++ b/packages/remark-math/readme.md @@ -153,10 +153,10 @@ See its readme for parse details: > 👉 **Note**: Like code, the difference between “inline” and “block”, > is in the line endings: -> +> > ```markdown > $$inline$$ -> +> > $$ > block > $$