Skip to content

Commit 669cce9

Browse files
refactor(eslint-plugin-query): Use @tanstack/config build (TanStack#6739)
* refactor(eslint-plugin-query): Use @tanstack/config build * Remove unused file (reported by knip)
1 parent f6845b0 commit 669cce9

File tree

5 files changed

+23
-31
lines changed

5 files changed

+23
-31
lines changed

packages/eslint-plugin-query/package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,33 @@
1515
"url": "https://github.com/sponsors/tannerlinsley"
1616
},
1717
"type": "module",
18-
"types": "build/legacy/index.d.ts",
19-
"main": "build/legacy/index.cjs",
20-
"module": "build/legacy/index.js",
18+
"types": "dist/esm/index.d.ts",
19+
"main": "dist/cjs/index.cjs",
20+
"module": "dist/esm/index.js",
2121
"exports": {
2222
".": {
2323
"import": {
24-
"types": "./build/legacy/index.d.ts",
25-
"default": "./build/legacy/index.js"
24+
"types": "./dist/esm/index.d.ts",
25+
"default": "./dist/esm/index.js"
2626
},
2727
"require": {
28-
"types": "./build/legacy/index.d.cts",
29-
"default": "./build/legacy/index.cjs"
28+
"types": "./dist/cjs/index.d.cts",
29+
"default": "./dist/cjs/index.cjs"
3030
}
3131
},
3232
"./package.json": "./package.json"
3333
},
3434
"scripts": {
35-
"clean": "rimraf ./build && rimraf ./coverage",
36-
"dev": "tsup --watch --sourcemap",
35+
"clean": "rimraf ./dist && rimraf ./coverage",
3736
"test:eslint": "eslint --ext .ts,.tsx ./src",
3837
"test:types": "tsc",
3938
"test:lib": "vitest",
4039
"test:lib:dev": "pnpm run test:lib --watch",
4140
"test:build": "publint --strict",
42-
"build": "tsup"
41+
"build": "vite build"
4342
},
4443
"files": [
45-
"build",
44+
"dist",
4645
"src"
4746
],
4847
"dependencies": {

packages/eslint-plugin-query/src/utils/object-utils.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": [
4-
"src/**/*.ts",
5-
"src/**/*.tsx",
6-
".eslintrc.cjs",
7-
"tsup.config.js",
8-
"vite.config.ts"
9-
]
3+
"include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "vite.config.ts"]
104
}

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

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { defineConfig } from 'vitest/config'
1+
import { defineConfig, mergeConfig } from 'vitest/config'
2+
import { tanstackBuildConfig } from '@tanstack/config/build'
23

3-
export default defineConfig({
4+
const config = defineConfig({
45
test: {
56
name: 'eslint-plugin-query',
67
dir: './src',
@@ -10,3 +11,12 @@ export default defineConfig({
1011
typecheck: { enabled: true },
1112
},
1213
})
14+
15+
export default mergeConfig(
16+
config,
17+
tanstackBuildConfig({
18+
entry: './src/index.ts',
19+
srcDir: './src',
20+
exclude: ['./src/__tests__'],
21+
}),
22+
)

0 commit comments

Comments
 (0)