Skip to content

Commit ec0bda4

Browse files
committed
Update dev-dependencies
1 parent b2323b5 commit ec0bda4

File tree

3 files changed

+12
-23
lines changed

3 files changed

+12
-23
lines changed

lib/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@
6767
* @typedef {ResultMaybeSourceMapGenerator} Result
6868
*/
6969

70-
// @ts-expect-error: `astring` has broken types.
7170
import * as astring from 'astring'
7271

7372
/** @type {Handlers} */
7473
const GENERATOR = astring.GENERATOR
7574

76-
/** @type {(node: Program, options: unknown) => string} */
7775
const generate = astring.generate
7876

7977
/**
@@ -108,6 +106,7 @@ export const toJs =
108106

109107
const value = generate(tree, {
110108
comments: true,
109+
// @ts-expect-error: assume all handlers are defined.
111110
generator: {...GENERATOR, ...handlers},
112111
sourceMap
113112
})

lib/types.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,8 @@
33
* @typedef {import('source-map').Mapping} Mapping
44
*/
55

6-
// To do: `astring` types are broken.
7-
// Either `import('astring').State` if everything is fixed, or:
8-
// `Omit<import('astring').State, 'write'> & {write: ((code: string, node?: Node) => void)}`
96
/**
10-
* @typedef State
11-
* @property {string} output
12-
* @property {(code: string, node?: Node) => void} write
13-
* @property {boolean} writeComments
14-
* @property {string} indent
15-
* @property {string} lineEnd
16-
* @property {number} indentLevel
17-
* @property {number | undefined} [line]
18-
* @property {number | undefined} [column]
19-
* @property {number | undefined} [lineEndSize]
20-
* @property {Mapping | undefined} [mapping]
7+
* @typedef {import('astring').State} State
218
*/
229

2310
/**

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@
4242
"source-map": "^0.7.0"
4343
},
4444
"devDependencies": {
45-
"@types/node": "^18.0.0",
46-
"c8": "^7.0.0",
47-
"prettier": "^2.0.0",
45+
"@types/node": "^20.0.0",
46+
"c8": "^8.0.0",
47+
"prettier": "^3.0.0",
4848
"remark-cli": "^11.0.0",
4949
"remark-preset-wooorm": "^9.0.0",
5050
"type-coverage": "^2.0.0",
51-
"typescript": "^4.0.0",
52-
"xo": "^0.53.0"
51+
"typescript": "^5.0.0",
52+
"xo": "^0.55.0"
5353
},
5454
"scripts": {
5555
"prepack": "npm run build && npm run format",
5656
"build": "tsc --build --clean && tsc --build && type-coverage",
57-
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
57+
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
5858
"test-api": "node --conditions development test/index.js",
5959
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
6060
"test": "npm run build && npm run format && npm run test-coverage"
@@ -68,7 +68,10 @@
6868
"trailingComma": "none"
6969
},
7070
"xo": {
71-
"prettier": true
71+
"prettier": true,
72+
"rules": {
73+
"unicorn/prefer-string-replace-all": "off"
74+
}
7275
},
7376
"remarkConfig": {
7477
"plugins": [

0 commit comments

Comments
 (0)