Skip to content

Commit 2f4cf3f

Browse files
authored
fix: correct types field in package.json (#184)
1 parent 6a8814c commit 2f4cf3f

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "The legacy ESLintRC config file format for ESLint",
55
"type": "module",
66
"main": "./dist/eslintrc.cjs",
7-
"types": "./dist/eslintrc.d.ts",
7+
"types": "./dist/eslintrc.d.cts",
88
"exports": {
99
".": {
1010
"import": "./lib/index.js",

rollup.config.js

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/** List of modules not included in the bundle. */
2+
const external = [
3+
"node:assert",
4+
"node:fs",
5+
"node:module",
6+
"node:os",
7+
"node:path",
8+
"node:url",
9+
"node:util",
10+
"ajv",
11+
"debug",
12+
"globals",
13+
"ignore",
14+
"import-fresh",
15+
"minimatch",
16+
"strip-json-comments"
17+
];
18+
119
/**
220
* Custom Rollup plugin for `import.meta.url` transformation to commonjs.
321
* The default transformation ('file:' + __filename) does not check characters in __filename,
@@ -20,11 +38,7 @@ function importMetaURLPlugin() {
2038
export default [
2139
{
2240
input: "./lib/index.js",
23-
external: [
24-
"module", "util", "os", "path", "debug", "fs", "import-fresh",
25-
"strip-json-comments", "assert", "ignore", "minimatch", "url", "ajv",
26-
"globals"
27-
],
41+
external,
2842
treeshake: false,
2943
output: {
3044
format: "cjs",
@@ -36,11 +50,7 @@ export default [
3650
},
3751
{
3852
input: "./lib/index-universal.js",
39-
external: [
40-
"module", "util", "os", "path", "debug", "fs", "import-fresh",
41-
"strip-json-comments", "assert", "ignore", "minimatch", "url", "ajv",
42-
"globals"
43-
],
53+
external,
4454
treeshake: false,
4555
output: {
4656
format: "cjs",

0 commit comments

Comments
 (0)