Skip to content

Commit d3fd40c

Browse files
committed
fix!: dts output
1 parent 45b7075 commit d3fd40c

File tree

4 files changed

+37
-20
lines changed

4 files changed

+37
-20
lines changed

package.json

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"name": "typescript-eslint-parser-for-extra-files",
33
"version": "0.8.0",
4+
"type": "module",
45
"description": "An experimental ESLint custom parser for Vue, Svelte, and Astro for use with TypeScript. It provides type information in combination with each framework's ESLint custom parser.",
5-
"repository": "git+https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files.git",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files.git"
9+
},
610
"homepage": "https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files#readme",
711
"author": "Yosuke Ota (https://github.com/ota-meshi)",
812
"funding": "https://github.com/sponsors/ota-meshi",
@@ -11,17 +15,23 @@
1115
"engines": {
1216
"node": ">=16.0.0"
1317
},
14-
"main": "lib/index.js",
15-
"module": "./lib/index.mjs",
18+
"main": "./lib/index.cjs",
19+
"module": "./lib/index.js",
20+
"types": "./lib/index.d.ts",
1621
"exports": {
1722
".": {
18-
"import": "./lib/index.mjs",
19-
"require": "./lib/index.js"
23+
"module-sync": {
24+
"types": "./lib/index.d.ts",
25+
"default": "./lib/index.js"
26+
},
27+
"default": {
28+
"types": "./lib/index.d.cts",
29+
"default": "./lib/index.cjs"
30+
}
2031
}
2132
},
22-
"types": "./lib/index.d.ts",
2333
"files": [
24-
"lib"
34+
"lib/"
2535
],
2636
"keywords": [
2737
"eslint",
@@ -32,7 +42,7 @@
3242
"typescript"
3343
],
3444
"scripts": {
35-
"build": "tsup",
45+
"build": "tsdown",
3646
"clean": "rimraf .nyc_output lib coverage",
3747
"cover": "nyc --reporter=lcov yarn test",
3848
"debug": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
@@ -107,12 +117,14 @@
107117
"prettier-plugin-astro": "^0.14.0",
108118
"prettier-plugin-pkg": "^0.19.0",
109119
"prettier-plugin-svelte": "^3.0",
120+
"publint": "^0.3.12",
110121
"semver": "^7.3.5",
111122
"svelte": "^4.0.0",
112123
"svelte-eslint-parser": "^1.0.0",
113124
"svelte2tsx": "^0.7.0",
114-
"tsup": "^8.0.0",
125+
"tsdown": "https://pkg.pr.new/tsdown@03230c4",
115126
"typescript": "~5.8.0",
127+
"unplugin-unused": "^0.4.4",
116128
"vue": "^3.2.41",
117129
"vue-eslint-parser": "^10.0.0"
118130
},

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
"target": "es2015",
44
"strict": true,
55
"lib": ["es2020", "DOM"],
6-
"module": "Node16",
7-
"moduleResolution": "Node16",
6+
"module": "Preserve",
7+
"moduleResolution": "Bundler",
88
"declaration": true,
9+
"isolatedModules": true,
10+
"isolatedDeclarations": true,
911
"noImplicitAny": true,
1012
"noImplicitReturns": true,
1113
"noFallthroughCasesInSwitch": true,

tsdown.config.mts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "tsdown";
2+
3+
export default defineConfig({
4+
entry: ["src/index.ts"],
5+
format: ["cjs", "esm"],
6+
target: ["node16"],
7+
external: [/package.json/],
8+
outDir: "lib",
9+
skipNodeModulesBundle: true,
10+
publint: { strict: true, pack: "npm" },
11+
unused: true,
12+
});

tsup.config.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)