Skip to content

Commit 01125e6

Browse files
fix(eslint-plugin-query): Use tsup to generate types (#5666)
1 parent 182f0f3 commit 01125e6

File tree

4 files changed

+213
-82
lines changed

4 files changed

+213
-82
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
"namespace": "@tanstack",
3232
"devDependencies": {
33+
"@arethetypeswrong/cli": "^0.4.2",
3334
"@babel/core": "^7.21.8",
3435
"@babel/preset-env": "^7.21.5",
3536
"@babel/preset-react": "^7.18.6",
@@ -78,7 +79,7 @@
7879
"nx-cloud": "^16.0.5",
7980
"prettier": "^2.8.8",
8081
"prettier-plugin-svelte": "^2.10.1",
81-
"publint": "^0.1.12",
82+
"publint": "^0.1.15",
8283
"react": "^18.2.0",
8384
"react-dom": "^18.2.0",
8485
"rimraf": "^5.0.1",

packages/eslint-plugin-query/package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616
"module": "build/lib/index.js",
1717
"exports": {
1818
".": {
19-
"types": "./build/lib/index.d.ts",
20-
"import": "./build/lib/index.js",
21-
"require": "./build/lib/index.cjs",
22-
"default": "./build/lib/index.cjs"
19+
"import": {
20+
"types": "./build/lib/index.d.ts",
21+
"default": "./build/lib/index.js"
22+
},
23+
"require": {
24+
"types": "./build/lib/index.d.cts",
25+
"default": "./build/lib/index.cjs"
26+
}
2327
},
2428
"./package.json": "./package.json"
2529
},
@@ -30,19 +34,17 @@
3034
"test:types": "tsc --noEmit",
3135
"test:lib": "vitest run --coverage",
3236
"test:lib:dev": "pnpm run test:lib --watch",
33-
"test:build": "publint --strict",
34-
"build": "pnpm build:tsup && pnpm build:types",
35-
"build:tsup": "tsup",
36-
"build:types": "tsc --emitDeclarationOnly"
37+
"test:build": "publint --strict && attw --pack",
38+
"build": "tsup"
3739
},
3840
"files": [
3941
"build",
4042
"src"
4143
],
44+
"dependencies": {
45+
"@typescript-eslint/utils": "^5.54.0"
46+
},
4247
"devDependencies": {
43-
"@typescript-eslint/eslint-plugin": "^5.54.0",
44-
"@typescript-eslint/parser": "^5.54.0",
45-
"@typescript-eslint/utils": "^5.54.0",
4648
"eslint": "^8.34.0"
4749
},
4850
"peerDependencies": {

packages/eslint-plugin-query/tsup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
format: ['cjs', 'esm'],
88
target: ['es2020', 'node16'],
99
outDir: 'build/lib',
10-
external: [/eslint/],
10+
dts: true,
1111
sourcemap: true,
1212
clean: true,
1313
})

0 commit comments

Comments
 (0)