Skip to content

Commit 9beb934

Browse files
committed
Update dev-dependencies
1 parent 5dd6e97 commit 9beb934

File tree

3 files changed

+41
-42
lines changed

3 files changed

+41
-42
lines changed

lib/index.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,6 @@ function handleDirective(node, _, state, info) {
308308
const subexit = state.enter(labelType)
309309
value += tracker.move('[')
310310
value += tracker.move(
311-
// @ts-expect-error: `containerPhrasing` is typed correctly, but TS
312-
// generates *hardcoded* types, which means that our dynamically added
313-
// directives are not present.
314-
// At some point, TS should fix that, and `from-markdown` should be fine.
315311
state.containerPhrasing(label, {
316312
...tracker.current(),
317313
before: value,
@@ -358,7 +354,7 @@ function peekDirective() {
358354
function attributes(node, state) {
359355
const quote = state.options.quote || '"'
360356
const subset = node.type === 'textDirective' ? [quote] : [quote, '\n', '\r']
361-
const attrs = node.attributes || {}
357+
const attributes = node.attributes || {}
362358
/** @type {Array<string>} */
363359
const values = []
364360
/** @type {string | undefined} */
@@ -370,13 +366,13 @@ function attributes(node, state) {
370366
/** @type {string} */
371367
let key
372368

373-
for (key in attrs) {
369+
for (key in attributes) {
374370
if (
375-
own.call(attrs, key) &&
376-
attrs[key] !== undefined &&
377-
attrs[key] !== null
371+
own.call(attributes, key) &&
372+
attributes[key] !== undefined &&
373+
attributes[key] !== null
378374
) {
379-
const value = String(attrs[key])
375+
const value = String(attributes[key])
380376

381377
if (key === 'id') {
382378
id = shortcut.test(value) ? '#' + value : quoted('id', value)

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@
4545
"unist-util-visit-parents": "^6.0.0"
4646
},
4747
"devDependencies": {
48-
"@types/node": "^20.0.0",
49-
"c8": "^8.0.0",
48+
"@types/node": "^22.0.0",
49+
"c8": "^10.0.0",
5050
"micromark-extension-directive": "^3.0.0",
51-
"prettier": "^2.0.0",
52-
"remark-cli": "^11.0.0",
53-
"remark-preset-wooorm": "^9.0.0",
51+
"prettier": "^3.0.0",
52+
"remark-cli": "^12.0.0",
53+
"remark-preset-wooorm": "^10.0.0",
5454
"type-coverage": "^2.0.0",
5555
"typescript": "^5.0.0",
5656
"unist-util-remove-position": "^5.0.0",
57-
"xo": "^0.54.0"
57+
"xo": "^0.60.0"
5858
},
5959
"scripts": {
6060
"prepack": "npm run build && npm run format",
@@ -97,6 +97,9 @@
9797
}
9898
}
9999
],
100-
"prettier": true
100+
"prettier": true,
101+
"rules": {
102+
"unicorn/prefer-at": "off"
103+
}
101104
}
102105
}

readme.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ such).
1414

1515
## Contents
1616

17-
* [What is this?](#what-is-this)
18-
* [When to use this](#when-to-use-this)
19-
* [Install](#install)
20-
* [Use](#use)
21-
* [API](#api)
22-
* [`directiveFromMarkdown()`](#directivefrommarkdown)
23-
* [`directiveToMarkdown()`](#directivetomarkdown)
24-
* [`ContainerDirective`](#containerdirective)
25-
* [`Directives`](#directives)
26-
* [`LeafDirective`](#leafdirective)
27-
* [`TextDirective`](#textdirective)
28-
* [HTML](#html)
29-
* [Syntax](#syntax)
30-
* [Syntax tree](#syntax-tree)
31-
* [Nodes](#nodes)
32-
* [Mixin](#mixin)
33-
* [Types](#types)
34-
* [Compatibility](#compatibility)
35-
* [Related](#related)
36-
* [Contribute](#contribute)
37-
* [License](#license)
17+
* [What is this?](#what-is-this)
18+
* [When to use this](#when-to-use-this)
19+
* [Install](#install)
20+
* [Use](#use)
21+
* [API](#api)
22+
* [`directiveFromMarkdown()`](#directivefrommarkdown)
23+
* [`directiveToMarkdown()`](#directivetomarkdown)
24+
* [`ContainerDirective`](#containerdirective)
25+
* [`Directives`](#directives)
26+
* [`LeafDirective`](#leafdirective)
27+
* [`TextDirective`](#textdirective)
28+
* [HTML](#html)
29+
* [Syntax](#syntax)
30+
* [Syntax tree](#syntax-tree)
31+
* [Nodes](#nodes)
32+
* [Mixin](#mixin)
33+
* [Types](#types)
34+
* [Compatibility](#compatibility)
35+
* [Related](#related)
36+
* [Contribute](#contribute)
37+
* [License](#license)
3838

3939
## What is this?
4040

@@ -457,10 +457,10 @@ This utility works with `mdast-util-from-markdown` version 2+ and
457457

458458
## Related
459459

460-
* [`remarkjs/remark-directive`][remark-directive]
461-
— remark plugin to support generic directives
462-
* [`micromark/micromark-extension-directive`][extension]
463-
— micromark extension to parse directives
460+
* [`remarkjs/remark-directive`][remark-directive]
461+
— remark plugin to support generic directives
462+
* [`micromark/micromark-extension-directive`][extension]
463+
— micromark extension to parse directives
464464

465465
## Contribute
466466

0 commit comments

Comments
 (0)