From 838c166d3f68977494a56fbc73dbf0bb48a63948 Mon Sep 17 00:00:00 2001 From: Eliya Cohen Date: Mon, 7 Apr 2025 19:31:30 +0300 Subject: [PATCH 1/6] chore(build): restructure eslint-plugin-query build configuration Aligned the build system with other packages by replacing the custom tsup config with standard modern/legacy build outputs. Moved output files from 'dist' to 'build' directory structure. Removed the patch-missing-export-equals.js script in favor of directly exporting the plugin. Added tsconfig.prod.json for production builds. --- packages/eslint-plugin-query/package.json | 21 +++++----- .../eslint-plugin-query/root.tsup.config.js | 39 +++++++++++++++++++ .../scripts/patch-missing-export-equals.js | 20 ---------- packages/eslint-plugin-query/src/index.ts | 2 +- .../eslint-plugin-query/tsconfig.prod.json | 8 ++++ packages/eslint-plugin-query/tsup.config.js | 9 +++++ packages/eslint-plugin-query/tsup.config.ts | 28 ------------- 7 files changed, 69 insertions(+), 58 deletions(-) create mode 100644 packages/eslint-plugin-query/root.tsup.config.js delete mode 100644 packages/eslint-plugin-query/scripts/patch-missing-export-equals.js create mode 100644 packages/eslint-plugin-query/tsconfig.prod.json create mode 100644 packages/eslint-plugin-query/tsup.config.js delete mode 100644 packages/eslint-plugin-query/tsup.config.ts diff --git a/packages/eslint-plugin-query/package.json b/packages/eslint-plugin-query/package.json index c2d698a4bc..31aacf0f0a 100644 --- a/packages/eslint-plugin-query/package.json +++ b/packages/eslint-plugin-query/package.json @@ -31,29 +31,32 @@ "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict && attw --pack", - "build": "tsup && node ./scripts/patch-missing-export-equals.js" + "build": "tsup --tsconfig tsconfig.prod.json" }, "type": "module", - "types": "dist/index.d.ts", - "main": "dist/index.cjs", - "module": "dist/index.js", + "types": "build/legacy/index.d.ts", + "main": "build/legacy/index.cjs", + "module": "build/legacy/index.js", + "react-native": "src/index.ts", "exports": { ".": { "import": { "@tanstack/custom-condition": "./src/index.ts", - "types": "./dist/index.d.ts", - "default": "./dist/index.js" + "types": "./build/modern/index.d.ts", + "default": "./build/modern/index.js" }, "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" + "types": "./build/modern/index.d.cts", + "default": "./build/modern/index.cjs" } }, "./package.json": "./package.json" }, "sideEffects": false, "files": [ - "dist" + "build", + "src", + "!src/__tests__" ], "dependencies": { "@typescript-eslint/utils": "^8.18.1" diff --git a/packages/eslint-plugin-query/root.tsup.config.js b/packages/eslint-plugin-query/root.tsup.config.js new file mode 100644 index 0000000000..60a86980bc --- /dev/null +++ b/packages/eslint-plugin-query/root.tsup.config.js @@ -0,0 +1,39 @@ +// @ts-check + +import { esbuildPluginFilePathExtensions } from 'esbuild-plugin-file-path-extensions' + +/** + * @param {Object} opts - Options for building configurations. + * @param {string[]} opts.entry - The entry array. + * @returns {import('tsup').Options} + */ +export function modernConfig(opts) { + return { + entry: opts.entry, + format: ['cjs', 'esm'], + target: ['chrome91', 'firefox90', 'edge91', 'safari15', 'ios15', 'opera77'], + outDir: 'build/modern', + dts: true, + sourcemap: true, + clean: true, + external: ["typescript"], + } +} + +/** + * @param {Object} opts - Options for building configurations. + * @param {string[]} opts.entry - The entry array. + * @returns {import('tsup').Options} + */ +export function legacyConfig(opts) { + return { + entry: opts.entry, + format: ['cjs', 'esm'], + target: ['es2020', 'node16'], + outDir: 'build/legacy', + dts: true, + sourcemap: true, + clean: true, + external: ["typescript"], + } +} diff --git a/packages/eslint-plugin-query/scripts/patch-missing-export-equals.js b/packages/eslint-plugin-query/scripts/patch-missing-export-equals.js deleted file mode 100644 index a066ff9404..0000000000 --- a/packages/eslint-plugin-query/scripts/patch-missing-export-equals.js +++ /dev/null @@ -1,20 +0,0 @@ -// @ts-check - -// https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/MissingExportEquals.md - -import fs from 'node:fs/promises' -import path from 'node:path' - -const projectDir = new URL('..', import.meta.url).pathname - -const dtsFiles = [ - path.join(projectDir, 'dist/index.d.ts'), - path.join(projectDir, 'dist/index.d.cts'), -] - -for (const file of dtsFiles) { - await fs.appendFile(file, '\n\nexport = plugin') - console.log( - `Appended \`export = plugin\` to ${path.relative(projectDir, file)}`, - ) -} diff --git a/packages/eslint-plugin-query/src/index.ts b/packages/eslint-plugin-query/src/index.ts index f16cb985b8..7a70f9e9ff 100644 --- a/packages/eslint-plugin-query/src/index.ts +++ b/packages/eslint-plugin-query/src/index.ts @@ -12,7 +12,7 @@ export interface Plugin extends Omit { } } -const plugin: Plugin = { +export const plugin: Plugin = { meta: { name: '@tanstack/eslint-plugin-query', }, diff --git a/packages/eslint-plugin-query/tsconfig.prod.json b/packages/eslint-plugin-query/tsconfig.prod.json new file mode 100644 index 0000000000..0f4c92da06 --- /dev/null +++ b/packages/eslint-plugin-query/tsconfig.prod.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "incremental": false, + "composite": false, + "rootDir": "../../" + } +} diff --git a/packages/eslint-plugin-query/tsup.config.js b/packages/eslint-plugin-query/tsup.config.js new file mode 100644 index 0000000000..fb3116bddb --- /dev/null +++ b/packages/eslint-plugin-query/tsup.config.js @@ -0,0 +1,9 @@ +// @ts-check + +import { defineConfig } from 'tsup' +import { legacyConfig, modernConfig } from './root.tsup.config.js' + +export default defineConfig([ + modernConfig({ entry: ['src/*.ts'] }), + legacyConfig({ entry: ['src/*.ts'] }), +]) diff --git a/packages/eslint-plugin-query/tsup.config.ts b/packages/eslint-plugin-query/tsup.config.ts deleted file mode 100644 index 72d176f858..0000000000 --- a/packages/eslint-plugin-query/tsup.config.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { defineConfig } from 'tsup' - -export default defineConfig({ - entry: { - index: 'src/index.ts', - rules: 'src/rules.ts', - }, - format: ['esm', 'cjs'], - dts: { - entry: './src/index.ts', - compilerOptions: { - composite: false, - incremental: false, - }, - }, - target: 'node20', - splitting: false, - sourcemap: true, - clean: true, - external: ['typescript'], - footer: ({ format }) => { - if (format === 'cjs') { - return { js: `module.exports = module.exports.default` } - } - - return - }, -}) From 1e6ee28a15810171f655f86238cb6c11a5c0aa73 Mon Sep 17 00:00:00 2001 From: Eliya Cohen Date: Mon, 7 Apr 2025 19:31:43 +0300 Subject: [PATCH 2/6] chore(example): eslint classic --- examples/react/eslint-legacy/.eslintrc | 3 + examples/react/eslint-legacy/.gitignore | 27 ++ examples/react/eslint-legacy/README.md | 6 + examples/react/eslint-legacy/index.html | 16 ++ examples/react/eslint-legacy/package.json | 27 ++ .../eslint-legacy/public/emblem-light.svg | 13 + examples/react/eslint-legacy/src/index.tsx | 161 +++++++++++ examples/react/eslint-legacy/tsconfig.json | 24 ++ examples/react/eslint-legacy/vite.config.ts | 6 + package.json | 3 +- pnpm-lock.yaml | 250 +++++++++++++++--- 11 files changed, 490 insertions(+), 46 deletions(-) create mode 100644 examples/react/eslint-legacy/.eslintrc create mode 100644 examples/react/eslint-legacy/.gitignore create mode 100644 examples/react/eslint-legacy/README.md create mode 100644 examples/react/eslint-legacy/index.html create mode 100644 examples/react/eslint-legacy/package.json create mode 100644 examples/react/eslint-legacy/public/emblem-light.svg create mode 100644 examples/react/eslint-legacy/src/index.tsx create mode 100644 examples/react/eslint-legacy/tsconfig.json create mode 100644 examples/react/eslint-legacy/vite.config.ts diff --git a/examples/react/eslint-legacy/.eslintrc b/examples/react/eslint-legacy/.eslintrc new file mode 100644 index 0000000000..2ba923f549 --- /dev/null +++ b/examples/react/eslint-legacy/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": ["plugin:@tanstack/query/recommended"] +} diff --git a/examples/react/eslint-legacy/.gitignore b/examples/react/eslint-legacy/.gitignore new file mode 100644 index 0000000000..4673b022e5 --- /dev/null +++ b/examples/react/eslint-legacy/.gitignore @@ -0,0 +1,27 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +pnpm-lock.yaml +yarn.lock +package-lock.json + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/examples/react/eslint-legacy/README.md b/examples/react/eslint-legacy/README.md new file mode 100644 index 0000000000..1cf8892652 --- /dev/null +++ b/examples/react/eslint-legacy/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` +- `npm run dev` diff --git a/examples/react/eslint-legacy/index.html b/examples/react/eslint-legacy/index.html new file mode 100644 index 0000000000..d7c231330c --- /dev/null +++ b/examples/react/eslint-legacy/index.html @@ -0,0 +1,16 @@ + + + + + + + + + TanStack Query React Basic Example App + + + +
+ + + diff --git a/examples/react/eslint-legacy/package.json b/examples/react/eslint-legacy/package.json new file mode 100644 index 0000000000..e4bd0017ab --- /dev/null +++ b/examples/react/eslint-legacy/package.json @@ -0,0 +1,27 @@ +{ + "name": "@tanstack/query-example-react-basic", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/query-sync-storage-persister": "^5.72.0", + "@tanstack/react-query": "^5.72.0", + "@tanstack/react-query-devtools": "^5.72.0", + "@tanstack/react-query-persist-client": "^5.72.0", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@tanstack/eslint-plugin-query": "^5.72.0", + "eslint": "^8.16.0", + "@types/react": "^18.2.79", + "@types/react-dom": "^18.2.25", + "@vitejs/plugin-react": "^4.3.4", + "typescript": "5.8.2", + "vite": "^6.2.4" + } +} diff --git a/examples/react/eslint-legacy/public/emblem-light.svg b/examples/react/eslint-legacy/public/emblem-light.svg new file mode 100644 index 0000000000..a58e69ad5e --- /dev/null +++ b/examples/react/eslint-legacy/public/emblem-light.svg @@ -0,0 +1,13 @@ + + + + emblem-light + Created with Sketch. + + + + + + + + \ No newline at end of file diff --git a/examples/react/eslint-legacy/src/index.tsx b/examples/react/eslint-legacy/src/index.tsx new file mode 100644 index 0000000000..052ce4c797 --- /dev/null +++ b/examples/react/eslint-legacy/src/index.tsx @@ -0,0 +1,161 @@ +import * as React from 'react' +import ReactDOM from 'react-dom/client' +import { QueryClient, useQuery, useQueryClient } from '@tanstack/react-query' +import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client' +import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister' +import { ReactQueryDevtools } from '@tanstack/react-query-devtools' + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + gcTime: 1000 * 60 * 60 * 24, // 24 hours + }, + }, +}) + +const persister = createSyncStoragePersister({ + storage: window.localStorage, +}) + +type Post = { + id: number + title: string + body: string +} + +function usePosts() { + return useQuery({ + queryKey: ['posts'], + queryFn: async (): Promise> => { + const response = await fetch('https://jsonplaceholder.typicode.com/posts') + return await response.json() + }, + }) +} + +function Posts({ + setPostId, +}: { + setPostId: React.Dispatch> +}) { + const queryClient = useQueryClient() + const { status, data, error, isFetching } = usePosts() + + return ( +
+

Posts

+
+ {status === 'pending' ? ( + 'Loading...' + ) : status === 'error' ? ( + Error: {error.message} + ) : ( + <> + +
{isFetching ? 'Background Updating...' : ' '}
+ + )} +
+
+ ) +} + +const getPostById = async (id: number): Promise => { + const response = await fetch( + `https://jsonplaceholder.typicode.com/posts/${id}`, + ) + return await response.json() +} + +function usePost(postId: number) { + return useQuery({ + queryKey: ['post', postId], + queryFn: () => getPostById(postId), + enabled: !!postId, + }) +} + +function Post({ + postId, + setPostId, +}: { + postId: number + setPostId: React.Dispatch> +}) { + const { status, data, error, isFetching } = usePost(postId) + + return ( +
+ + {!postId || status === 'pending' ? ( + 'Loading...' + ) : status === 'error' ? ( + Error: {error.message} + ) : ( + <> +

{data.title}

+
+

{data.body}

+
+
{isFetching ? 'Background Updating...' : ' '}
+ + )} +
+ ) +} + +function App() { + const [postId, setPostId] = React.useState(-1) + + return ( + +

+ As you visit the posts below, you will notice them in a loading state + the first time you load them. However, after you return to this list and + click on any posts you have already visited again, you will see them + load instantly and background refresh right before your eyes!{' '} + + (You may need to throttle your network speed to simulate longer + loading sequences) + +

+ {postId > -1 ? ( + + ) : ( + + )} + +
+ ) +} + +const rootElement = document.getElementById('root') as HTMLElement +ReactDOM.createRoot(rootElement).render() diff --git a/examples/react/eslint-legacy/tsconfig.json b/examples/react/eslint-legacy/tsconfig.json new file mode 100644 index 0000000000..23a8707ef4 --- /dev/null +++ b/examples/react/eslint-legacy/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src", "eslint.config.js"] +} diff --git a/examples/react/eslint-legacy/vite.config.ts b/examples/react/eslint-legacy/vite.config.ts new file mode 100644 index 0000000000..9ffcc67574 --- /dev/null +++ b/examples/react/eslint-legacy/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react()], +}) diff --git a/package.json b/package.json index 44c3cb9d00..17d842c108 100644 --- a/package.json +++ b/package.json @@ -100,8 +100,7 @@ "@tanstack/vue-query": "workspace:*", "@tanstack/vue-query-devtools": "workspace:*", "@types/react": "^19.0.1", - "@types/react-dom": "^19.0.2", - "eslint": "$eslint" + "@types/react-dom": "^19.0.2" } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5b2acc6a7e..59ad82552f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,31 +5,30 @@ settings: excludeLinksFromLockfile: false overrides: - '@types/react': ^19.0.1 - '@types/react-dom': ^19.0.2 - eslint: ^9.15.0 + '@tanstack/angular-query-devtools-experimental': workspace:* + '@tanstack/angular-query-experimental': workspace:* + '@tanstack/eslint-plugin-query': workspace:* + '@tanstack/query-async-storage-persister': workspace:* + '@tanstack/query-broadcast-client-experimental': workspace:* + '@tanstack/query-codemods': workspace:* + '@tanstack/query-core': workspace:* + '@tanstack/query-devtools': workspace:* + '@tanstack/query-persist-client-core': workspace:* + '@tanstack/query-sync-storage-persister': workspace:* '@tanstack/react-query': workspace:* '@tanstack/react-query-devtools': workspace:* - '@tanstack/react-query-persist-client': workspace:* '@tanstack/react-query-next-experimental': workspace:* + '@tanstack/react-query-persist-client': workspace:* '@tanstack/solid-query': workspace:* '@tanstack/solid-query-devtools': workspace:* '@tanstack/solid-query-persist-client': workspace:* - '@tanstack/vue-query': workspace:* - '@tanstack/vue-query-devtools': workspace:* - '@tanstack/angular-query-experimental': workspace:* - '@tanstack/angular-query-devtools-experimental': workspace:* '@tanstack/svelte-query': workspace:* '@tanstack/svelte-query-devtools': workspace:* '@tanstack/svelte-query-persist-client': workspace:* - '@tanstack/query-core': workspace:* - '@tanstack/query-devtools': workspace:* - '@tanstack/query-persist-client-core': workspace:* - '@tanstack/query-async-storage-persister': workspace:* - '@tanstack/query-sync-storage-persister': workspace:* - '@tanstack/query-broadcast-client-experimental': workspace:* - '@tanstack/eslint-plugin-query': workspace:* - '@tanstack/query-codemods': workspace:* + '@tanstack/vue-query': workspace:* + '@tanstack/vue-query-devtools': workspace:* + '@types/react': ^19.0.1 + '@types/react-dom': ^19.0.2 importers: @@ -809,6 +808,49 @@ importers: specifier: ^6.2.4 version: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.29.2)(sass@1.86.0)(terser@5.39.0)(yaml@2.6.1) + examples/react/eslint-legacy: + dependencies: + '@tanstack/query-sync-storage-persister': + specifier: workspace:* + version: link:../../../packages/query-sync-storage-persister + '@tanstack/react-query': + specifier: workspace:* + version: link:../../../packages/react-query + '@tanstack/react-query-devtools': + specifier: workspace:* + version: link:../../../packages/react-query-devtools + '@tanstack/react-query-persist-client': + specifier: workspace:* + version: link:../../../packages/react-query-persist-client + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@tanstack/eslint-plugin-query': + specifier: workspace:* + version: link:../../../packages/eslint-plugin-query + '@types/react': + specifier: ^19.0.1 + version: 19.0.1 + '@types/react-dom': + specifier: ^19.0.2 + version: 19.0.2(@types/react@19.0.1) + '@vitejs/plugin-react': + specifier: ^4.3.4 + version: 4.3.4(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.29.2)(sass@1.86.0)(terser@5.39.0)(yaml@2.6.1)) + eslint: + specifier: ^8.16.0 + version: 8.57.1 + typescript: + specifier: 5.8.2 + version: 5.8.2 + vite: + specifier: ^6.2.4 + version: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.29.2)(sass@1.86.0)(terser@5.39.0)(yaml@2.6.1) + examples/react/infinite-query-with-max-pages: dependencies: '@tanstack/react-query': @@ -3944,7 +3986,7 @@ packages: resolution: {integrity: sha512-S3+NKHqba0gsrWHPcQkFNs+yCGhyPbFyO5aY8l2sETKJJutL02Qy/qTVJdmA0TYnYUeu1SvDyLL9BJbWuzJ9tA==} engines: {node: '>=18'} peerDependencies: - eslint: ^9.15.0 + eslint: ^7 || ^8 || ^9 '@cspell/filetypes@8.17.1': resolution: {integrity: sha512-AxYw6j7EPYtDFAFjwybjFpMc9waXQzurfBXmEVfQ5RQRlbylujLZWwR6GnMqofeNg4oGDUpEjcAZFrgdkvMQlA==} @@ -4656,7 +4698,7 @@ packages: resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 '@eslint-community/regexpp@4.12.1': resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} @@ -4675,7 +4717,7 @@ packages: resolution: {integrity: sha512-JZH1RLbOQBFm6TJNjKp5GuUwrA8JRE8r0PzXi/c12uveFFOWL5yqLcdOzvBNxrt/6tZiL9h0tcYkLe3MC6babg==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 peerDependenciesMeta: typescript: @@ -4701,10 +4743,18 @@ packages: resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/eslintrc@3.2.0': resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/js@9.15.0': resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4819,10 +4869,19 @@ packages: resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} engines: {node: '>=18.18.0'} + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.3.0': resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} @@ -6431,7 +6490,7 @@ packages: resolution: {integrity: sha512-btchD0P3iij6cIk5RR5QMdEhtCCV0+L6cNheGhGCd//jaHILZMTi/EOqgEDAf1s4ZoViyExoToM+S2Iwa3U9DA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.15.0 + eslint: '>=8.40.0' '@sveltejs/acorn-typescript@1.0.5': resolution: {integrity: sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ==} @@ -6855,21 +6914,21 @@ packages: engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/parser@8.18.1': resolution: {integrity: sha512-rBnTWHCdbYM2lh7hjyXqxk70wvon3p2FyaniZuey5TrcGBpfhVp0OxOa6gxr9Q9YhZFKyfbEnxc24ZnVbbUkCA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/rule-tester@8.18.1': resolution: {integrity: sha512-Ri73SSfOfd+aESELU2k0ikpIahTSY1VVsGiFWarDy54HSuMMZc/2JCST0dfpRep3egAvcI5/lcQvRHmSyzcA4g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 '@typescript-eslint/scope-manager@8.18.1': resolution: {integrity: sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==} @@ -6879,7 +6938,7 @@ packages: resolution: {integrity: sha512-jAhTdK/Qx2NJPNOTxXpMwlOiSymtR2j283TtPqXkKBdH8OAMmhiUfP0kJjc/qSE51Xrq02Gj9NY7MwK+UxVwHQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/types@8.18.1': @@ -6896,7 +6955,7 @@ packages: resolution: {integrity: sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/visitor-keys@8.18.1': @@ -6993,7 +7052,7 @@ packages: resolution: {integrity: sha512-IjBV/fcL9NJRxGw221ieaDsqKqj8qUo7rvSupDxMjTXyhsCusHC6M+jFUNqBp4PCkYFcf5bjrKxeZoCEWoPxig==} peerDependencies: '@typescript-eslint/utils': ^8.24.0 - eslint: ^9.15.0 + eslint: '>= 8.57.0' typescript: '>= 5.0.0' vitest: '*' peerDependenciesMeta: @@ -9149,7 +9208,7 @@ packages: resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} engines: {node: '>=12'} peerDependencies: - eslint: ^9.15.0 + eslint: '>=6.0.0' eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} @@ -9158,37 +9217,37 @@ packages: resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - eslint: ^9.15.0 + eslint: '>=8' eslint-plugin-import-x@4.6.1: resolution: {integrity: sha512-wluSUifMIb7UfwWXqx7Yx0lE/SGCcGXECLx/9bCmbY2nneLwvAZ4vkd1IXDjPKFvdcdUgr1BaRnaRpx3k2+Pfw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 eslint-plugin-jsdoc@50.5.0: resolution: {integrity: sha512-xTkshfZrUbiSHXBwZ/9d5ulZ2OcHXxSvm/NPo494H/hadLRJwOq5PMV0EUpMqsb9V+kQo+9BAgi6Z7aJtdBp2A==} engines: {node: '>=18'} peerDependencies: - eslint: ^9.15.0 + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 eslint-plugin-n@17.14.0: resolution: {integrity: sha512-maxPLMEA0rPmRpoOlxEclKng4UpDe+N5BJS4t24I3UKnN109Qcivnfs37KMy84G0af3bxjog5lKctP5ObsvcTA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.15.0 + eslint: '>=8.23.0' eslint-plugin-react-compiler@19.0.0-beta-df7b47d-20241124: resolution: {integrity: sha512-82PfnllC8jP/68KdLAbpWuYTcfmtGLzkqy2IW85WopKMTr+4rdQpp+lfliQ/QE79wWrv/dRoADrk3Pdhq25nTw==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: - eslint: ^9.15.0 + eslint: '>=7' eslint-plugin-react-debug@1.21.0: resolution: {integrity: sha512-ftBeA++SfKkGosxOt6Pl9BGLhi09ry9pqVrciYXt+jhAzW2xYLC8sFkIiHQgYULpPhXCQZioJiSkRWWPy/VPJg==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 peerDependenciesMeta: typescript: @@ -9198,7 +9257,7 @@ packages: resolution: {integrity: sha512-yZDS2NYIoVUNFdWzc+PA4wFIuuBogy4cvzdAq95J5E4TJMRwGvnhv+w6bKArmYa24tc8vDWCvyZX9+5crVZ8FQ==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 peerDependenciesMeta: typescript: @@ -9208,7 +9267,7 @@ packages: resolution: {integrity: sha512-V4VKhF4aLJBcM1hsns/fFsSyE3nFolh1RQeSKeGk/ZS4TzzzygX5IrLpeAAzbrqpTIEtHx8mpa1tGJwSwj1TaQ==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 peerDependenciesMeta: typescript: @@ -9218,13 +9277,13 @@ packages: resolution: {integrity: sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw==} engines: {node: '>=10'} peerDependencies: - eslint: ^9.15.0 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 eslint-plugin-react-naming-convention@1.21.0: resolution: {integrity: sha512-5+Am0MpqwB/dXaCv3gbR2iOFO+FSV0p3jBqnQG8pJ0VFx+dQNS+ZJPa8LiVPJnHj8fQpiXuxs06L4TSZ2yhu5w==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 peerDependenciesMeta: typescript: @@ -9234,7 +9293,7 @@ packages: resolution: {integrity: sha512-iEfZ+mbIwzjvfiftgZP1u+8Zmc2d0QNimpYmFwmYcBhJGGUbIzDp8VRx/c04BWyB/+3xRgPWXqi932L++jTQ7g==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 peerDependenciesMeta: typescript: @@ -9244,7 +9303,7 @@ packages: resolution: {integrity: sha512-Mr/SZwIy8aqo3gx0NuoGJjOZzuAOYwEAg0sFASBvP9PIXJCqXPKPNlivo+1fdK+BOP+NiU+ISLLCCw/mVF+BwA==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 peerDependenciesMeta: typescript: @@ -9254,7 +9313,7 @@ packages: resolution: {integrity: sha512-1A7iEMkzmCZ9/Iz+EAfOGYL8IoIG6zeKEq1SmpxGeM5SXmoQq+ZNnCpXFVJpsxPWYx8jIVGMerQMzX20cqUl0g==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^7.0.0 || ^8.0.0-0 || ^9.0.0-0 svelte: ^3.37.0 || ^4.0.0 || ^5.0.0 peerDependenciesMeta: svelte: @@ -9264,7 +9323,7 @@ packages: resolution: {integrity: sha512-5Dw3yxEyuBSXTzT5/Ge1X5kIkRTQ3nvBn/VwPwInNiZBSJOO/timWMUaflONnFBzU6NhB68lxnCda7ULV5N7LA==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 eslint-scope@4.0.3: resolution: {integrity: sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==} @@ -9290,6 +9349,12 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + eslint@9.15.0: resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -9562,6 +9627,10 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -9635,6 +9704,10 @@ packages: resolution: {integrity: sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==} engines: {node: '>= 10.13.0'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -10502,7 +10575,7 @@ packages: is-immutable-type@5.0.0: resolution: {integrity: sha512-mcvHasqbRBWJznuPqqHRKiJgYAz60sZ0mvO3bN70JbkuK7ksfmgc489aKZYxMEjIbRvyOseaTjaRZLRF/xFeRA==} peerDependencies: - eslint: ^9.15.0 + eslint: '*' typescript: '>=4.7.4' is-in-browser@1.1.3: @@ -14325,6 +14398,9 @@ packages: resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} engines: {node: '>=8'} + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -14626,7 +14702,7 @@ packages: resolution: {integrity: sha512-Mlaw6yxuaDEPQvb/2Qwu3/TfgeBHy9iTJ3mTwe7OvpPmF6KPQjVOfGyEJpPv6Ez2C34OODChhXrzYw/9phI0MQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.15.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' typescript@5.0.4: @@ -15352,7 +15428,7 @@ packages: resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^9.15.0 + eslint: '>=6.0.0' vue-tsc@2.0.29: resolution: {integrity: sha512-MHhsfyxO3mYShZCGYNziSbc63x7cQ5g9kvijV7dRe1TTXBRLxXyL0FnXWpUF1xII2mJ86mwYpYsUmMwkmerq7Q==} @@ -17983,6 +18059,11 @@ snapshots: '@esbuild/win32-x64@0.25.2': optional: true + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0(jiti@2.4.2))': dependencies: eslint: 9.15.0(jiti@2.4.2) @@ -18109,6 +18190,20 @@ snapshots: '@eslint/core@0.9.0': {} + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.4.0 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + '@eslint/eslintrc@3.2.0': dependencies: ajv: 6.12.6 @@ -18123,6 +18218,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/js@8.57.1': {} + '@eslint/js@9.15.0': {} '@eslint/js@9.17.0': {} @@ -18454,8 +18551,18 @@ snapshots: '@humanfs/core': 0.19.1 '@humanwhocodes/retry': 0.3.0 + '@humanwhocodes/config-array@0.13.0': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.4.0 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} + '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.0': {} '@humanwhocodes/retry@0.4.1': {} @@ -23888,6 +23995,49 @@ snapshots: eslint-visitor-keys@4.2.0: {} + eslint@8.57.1: + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.0 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + eslint@9.15.0(jiti@2.4.2): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0(jiti@2.4.2)) @@ -24287,6 +24437,10 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -24389,6 +24543,12 @@ snapshots: flagged-respawn@2.0.0: {} + flat-cache@3.2.0: + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + rimraf: 3.0.2 + flat-cache@4.0.1: dependencies: flatted: 3.3.1 @@ -30187,6 +30347,8 @@ snapshots: text-extensions@2.4.0: {} + text-table@0.2.0: {} + thenify-all@1.6.0: dependencies: thenify: 3.3.1 From 4dfdcca24004ae144b3a374b7af8e000ea2355a6 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 16:34:04 +0000 Subject: [PATCH 3/6] ci: apply automated fixes --- packages/eslint-plugin-query/root.tsup.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin-query/root.tsup.config.js b/packages/eslint-plugin-query/root.tsup.config.js index 60a86980bc..8ba2ed2db7 100644 --- a/packages/eslint-plugin-query/root.tsup.config.js +++ b/packages/eslint-plugin-query/root.tsup.config.js @@ -16,7 +16,7 @@ export function modernConfig(opts) { dts: true, sourcemap: true, clean: true, - external: ["typescript"], + external: ['typescript'], } } @@ -34,6 +34,6 @@ export function legacyConfig(opts) { dts: true, sourcemap: true, clean: true, - external: ["typescript"], + external: ['typescript'], } } From c836a9533464791f9f6f6204a9ff891d6314eb9f Mon Sep 17 00:00:00 2001 From: TkDodo Date: Mon, 7 Apr 2025 19:53:59 +0200 Subject: [PATCH 4/6] fix: unique name for examples --- examples/react/eslint-legacy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/react/eslint-legacy/package.json b/examples/react/eslint-legacy/package.json index e4bd0017ab..fa815a0112 100644 --- a/examples/react/eslint-legacy/package.json +++ b/examples/react/eslint-legacy/package.json @@ -1,5 +1,5 @@ { - "name": "@tanstack/query-example-react-basic", + "name": "@tanstack/query-example-eslint-legacy", "private": true, "type": "module", "scripts": { From 0e32455fd91be64c76e0d023eb70e212af0aee5f Mon Sep 17 00:00:00 2001 From: Eliya Cohen Date: Tue, 8 Apr 2025 10:57:09 +0300 Subject: [PATCH 5/6] remove unused import --- packages/eslint-plugin-query/root.tsup.config.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/eslint-plugin-query/root.tsup.config.js b/packages/eslint-plugin-query/root.tsup.config.js index 8ba2ed2db7..2aa0477136 100644 --- a/packages/eslint-plugin-query/root.tsup.config.js +++ b/packages/eslint-plugin-query/root.tsup.config.js @@ -1,7 +1,5 @@ // @ts-check -import { esbuildPluginFilePathExtensions } from 'esbuild-plugin-file-path-extensions' - /** * @param {Object} opts - Options for building configurations. * @param {string[]} opts.entry - The entry array. From d2edccef546ccf65cefae25e646142dbf3c95783 Mon Sep 17 00:00:00 2001 From: Eliya Cohen Date: Tue, 8 Apr 2025 17:16:09 +0300 Subject: [PATCH 6/6] chore: add eslint test script to react examples and update eslint test command Add `test:eslint` script to react example package.json files to enable linting checks. Update the main `test:eslint` command to remove the exclusion of examples, ensuring linting is applied across the entire project. --- examples/react/basic/package.json | 3 ++- examples/react/eslint-legacy/package.json | 3 ++- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 51b850c528..a3a0c7367c 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "test:eslint": "eslint ./src" }, "dependencies": { "@tanstack/query-sync-storage-persister": "^5.72.0", diff --git a/examples/react/eslint-legacy/package.json b/examples/react/eslint-legacy/package.json index fa815a0112..a5fee7f77d 100644 --- a/examples/react/eslint-legacy/package.json +++ b/examples/react/eslint-legacy/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "test:eslint": "eslint ./src" }, "dependencies": { "@tanstack/query-sync-storage-persister": "^5.72.0", diff --git a/package.json b/package.json index 17d842c108..46bfd635cd 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "test": "pnpm run test:ci", "test:pr": "nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build", "test:ci": "nx run-many --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build", - "test:eslint": "nx affected --target=test:eslint --exclude=examples/**", + "test:eslint": "nx affected --target=test:eslint", "test:format": "pnpm run prettier --check", "test:sherif": "sherif -i typescript -p \"./integrations/*\" -p \"./examples/*\"", "test:lib": "nx affected --target=test:lib --exclude=examples/**",