Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 7bd1fc1

Browse files
authored
fix: correct types for node16 resolution (#47)
* fix: correct types for node16 resolution * Delete eslint-visitor-keys-3.4.0.tgz
1 parent c982093 commit 7bd1fc1

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import KEYS from "./visitor-keys.js";
66

77
/**
8-
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
8+
* @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys
99
*/
1010

1111
// List to ignore keys.

lib/visitor-keys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {import('./index.js').VisitorKeys} VisitorKeys
2+
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
33
*/
44

55
/**

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"dist/index.d.ts",
2020
"dist/visitor-keys.d.ts",
2121
"dist/eslint-visitor-keys.cjs",
22+
"dist/eslint-visitor-keys.d.cts",
2223
"lib"
2324
],
2425
"engines": {
@@ -40,6 +41,7 @@
4041
"mocha": "^9.2.1",
4142
"opener": "^1.5.2",
4243
"rollup": "^2.70.0",
44+
"rollup-plugin-dts": "^4.2.3",
4345
"tsd": "^0.19.1",
4446
"typescript": "^4.6.2"
4547
},

rollup.config.js

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
export default {
2-
input: "./lib/index.js",
3-
treeshake: false,
4-
output: {
5-
format: "cjs",
6-
file: "dist/eslint-visitor-keys.cjs"
1+
import dts from "rollup-plugin-dts";
2+
3+
export default [
4+
{
5+
input: "./lib/index.js",
6+
treeshake: false,
7+
output: {
8+
format: "cjs",
9+
file: "dist/eslint-visitor-keys.cjs"
10+
}
11+
},
12+
{
13+
plugins: [dts()],
14+
input: "./lib/index.js",
15+
treeshake: false,
16+
output: {
17+
format: "cjs",
18+
file: "dist/eslint-visitor-keys.d.cts"
19+
}
720
}
8-
};
21+
];

0 commit comments

Comments
 (0)