Skip to content

Commit d5b96c5

Browse files
committed
Update dev-dependencies
1 parent df3455b commit d5b96c5

File tree

3 files changed

+51
-49
lines changed

3 files changed

+51
-49
lines changed

lib/index.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,34 +143,36 @@ function rule(query, state) {
143143
*/
144144
function attributesToHast(attributes) {
145145
/** @type {HastProperties} */
146-
const props = {}
146+
const properties = {}
147147
let index = -1
148148

149149
if (attributes) {
150150
while (++index < attributes.length) {
151-
const attr = attributes[index]
151+
const attribute = attributes[index]
152152

153-
if ('operator' in attr) {
154-
if (attr.operator === '=') {
155-
const value = attr.value
153+
if ('operator' in attribute) {
154+
if (attribute.operator === '=') {
155+
const value = attribute.value
156156

157157
// eslint-disable-next-line max-depth
158158
if (value) {
159159
assert(value.type === 'String', 'substitution are not enabled')
160-
props[attr.name] = value.value
160+
properties[attribute.name] = value.value
161161
}
162162
} else {
163163
throw new Error(
164-
'Cannot handle attribute equality modifier `' + attr.operator + '`'
164+
'Cannot handle attribute equality modifier `' +
165+
attribute.operator +
166+
'`'
165167
)
166168
}
167169
} else {
168-
props[attr.name] = true
170+
properties[attribute.name] = true
169171
}
170172
}
171173
}
172174

173-
return props
175+
return properties
174176
}
175177

176178
/**

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@
4141
"hastscript": "^8.0.0"
4242
},
4343
"devDependencies": {
44-
"@types/node": "^20.0.0",
45-
"c8": "^8.0.0",
44+
"@types/node": "^22.0.0",
45+
"c8": "^10.0.0",
4646
"prettier": "^3.0.0",
47-
"remark-cli": "^11.0.0",
48-
"remark-preset-wooorm": "^9.0.0",
47+
"remark-cli": "^12.0.0",
48+
"remark-preset-wooorm": "^10.0.0",
4949
"type-coverage": "^2.0.0",
5050
"typescript": "^5.0.0",
5151
"unist-builder": "^4.0.0",
52-
"xo": "^0.55.0"
52+
"xo": "^0.59.0"
5353
},
5454
"scripts": {
5555
"prepack": "npm run build && npm run format",

readme.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212

1313
## Contents
1414

15-
* [What is this?](#what-is-this)
16-
* [When should I use this?](#when-should-i-use-this)
17-
* [Install](#install)
18-
* [Use](#use)
19-
* [API](#api)
20-
* [`fromSelector(selector?[, options])`](#fromselectorselector-options)
21-
* [`Options`](#options)
22-
* [`Space`](#space)
23-
* [Support](#support)
24-
* [Types](#types)
25-
* [Compatibility](#compatibility)
26-
* [Security](#security)
27-
* [Related](#related)
28-
* [Contribute](#contribute)
29-
* [License](#license)
15+
* [What is this?](#what-is-this)
16+
* [When should I use this?](#when-should-i-use-this)
17+
* [Install](#install)
18+
* [Use](#use)
19+
* [API](#api)
20+
* [`fromSelector(selector?[, options])`](#fromselectorselector-options)
21+
* [`Options`](#options)
22+
* [`Space`](#space)
23+
* [Support](#support)
24+
* [Types](#types)
25+
* [Compatibility](#compatibility)
26+
* [Security](#security)
27+
* [Related](#related)
28+
* [Contribute](#contribute)
29+
* [License](#license)
3030

3131
## What is this?
3232

@@ -107,10 +107,10 @@ Create one or more [`Element`][element]s from a CSS selector.
107107

108108
###### Parameters
109109

110-
* `selector` (`string`, default: `''`)
111-
— CSS selector
112-
* `options` ([`Options`][api-options], optional)
113-
— configuration
110+
* `selector` (`string`, default: `''`)
111+
— CSS selector
112+
* `options` ([`Options`][api-options], optional)
113+
— configuration
114114

115115
###### Returns
116116

@@ -122,10 +122,10 @@ Configuration (TypeScript type).
122122

123123
###### Fields
124124

125-
* `space` ([`Space`][api-space], default: `'html'`)
126-
— which space first element in the selector is in.
127-
When an `svg` element is created in HTML, the space is automatically
128-
switched to SVG
125+
* `space` ([`Space`][api-space], default: `'html'`)
126+
— which space first element in the selector is in.
127+
When an `svg` element is created in HTML, the space is automatically
128+
switched to SVG
129129

130130
### `Space`
131131

@@ -139,16 +139,16 @@ type Space = 'html' | 'svg'
139139
140140
## Support
141141
142-
* [x] `*` (universal selector, *creates a `div` in HTML, `g` in SVG*)
143-
* [x] `p` (type selector)
144-
* [x] `.class` (class selector)
145-
* [x] `#id` (id selector)
146-
* [x] `[attr]` (attribute existence, *creates a boolean*)
147-
* [x] `[attr=value]` (attribute equality)
148-
* [x] `article p` (descendant combinator)
149-
* [x] `article > p` (child combinator)
150-
* [x] `section h1 + p` (next-sibling combinator, *not at root*)
151-
* [x] `section h1 ~ p` (subsequent-sibling combinator, *not at root*)
142+
* [x] `*` (universal selector, *creates a `div` in HTML, `g` in SVG*)
143+
* [x] `p` (type selector)
144+
* [x] `.class` (class selector)
145+
* [x] `#id` (id selector)
146+
* [x] `[attr]` (attribute existence, *creates a boolean*)
147+
* [x] `[attr=value]` (attribute equality)
148+
* [x] `article p` (descendant combinator)
149+
* [x] `article > p` (child combinator)
150+
* [x] `section h1 + p` (next-sibling combinator, *not at root*)
151+
* [x] `section h1 ~ p` (subsequent-sibling combinator, *not at root*)
152152
153153
## Types
154154
@@ -177,8 +177,8 @@ Either do not use user input in `from-selector` or use
177177
178178
## Related
179179
180-
* [`hast-util-parse-selector`](https://github.com/syntax-tree/hast-util-parse-selector)
181-
— create an element from a simple CSS selector
180+
* [`hast-util-parse-selector`](https://github.com/syntax-tree/hast-util-parse-selector)
181+
— create an element from a simple CSS selector
182182
183183
## Contribute
184184

0 commit comments

Comments
 (0)