Skip to content

Commit

Permalink
fix(eslint-plugin-query): Use tsup to generate types (#5666)
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins authored Jul 3, 2023
1 parent 182f0f3 commit 01125e6
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 82 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"namespace": "@tanstack",
"devDependencies": {
"@arethetypeswrong/cli": "^0.4.2",
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/preset-react": "^7.18.6",
Expand Down Expand Up @@ -78,7 +79,7 @@
"nx-cloud": "^16.0.5",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"publint": "^0.1.12",
"publint": "^0.1.15",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.1",
Expand Down
24 changes: 13 additions & 11 deletions packages/eslint-plugin-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
"module": "build/lib/index.js",
"exports": {
".": {
"types": "./build/lib/index.d.ts",
"import": "./build/lib/index.js",
"require": "./build/lib/index.cjs",
"default": "./build/lib/index.cjs"
"import": {
"types": "./build/lib/index.d.ts",
"default": "./build/lib/index.js"
},
"require": {
"types": "./build/lib/index.d.cts",
"default": "./build/lib/index.cjs"
}
},
"./package.json": "./package.json"
},
Expand All @@ -30,19 +34,17 @@
"test:types": "tsc --noEmit",
"test:lib": "vitest run --coverage",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "pnpm build:tsup && pnpm build:types",
"build:tsup": "tsup",
"build:types": "tsc --emitDeclarationOnly"
"test:build": "publint --strict && attw --pack",
"build": "tsup"
},
"files": [
"build",
"src"
],
"dependencies": {
"@typescript-eslint/utils": "^5.54.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@typescript-eslint/utils": "^5.54.0",
"eslint": "^8.34.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-query/tsup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
format: ['cjs', 'esm'],
target: ['es2020', 'node16'],
outDir: 'build/lib',
external: [/eslint/],
dts: true,
sourcemap: true,
clean: true,
})
Loading

0 comments on commit 01125e6

Please sign in to comment.