Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .changeset/esm-only-packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@tanstack/eslint-plugin-query': major
'@tanstack/lit-query': major
'@tanstack/preact-query': major
'@tanstack/preact-query-devtools': major
'@tanstack/preact-query-persist-client': major
'@tanstack/query-async-storage-persister': major
'@tanstack/query-broadcast-client-experimental': major
'@tanstack/query-core': major
'@tanstack/query-devtools': major
'@tanstack/query-persist-client-core': major
'@tanstack/react-query': major
'@tanstack/react-query-devtools': major
'@tanstack/react-query-next-experimental': major
'@tanstack/react-query-persist-client': major
'@tanstack/solid-query': major
'@tanstack/solid-query-devtools': major
'@tanstack/solid-query-persist-client': major
'@tanstack/vue-query': major
---

Publish ESM builds only and remove the legacy builds. Use `import` to load TanStack Query. If your application uses webpack 4, upgrade to webpack 5 or another bundler that supports the modern build. If you use the ESLint plugin with `.eslintrc`, migrate to flat config.
4 changes: 2 additions & 2 deletions .size-limit.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[
{
"name": "react full",
"path": "packages/react-query/build/modern/index.js",
"path": "packages/react-query/build/index.js",
"limit": "13.00 kB",
"ignore": ["react", "react-dom"]
},
{
"name": "react minimal",
"path": "packages/react-query/build/modern/index.js",
"path": "packages/react-query/build/index.js",
"limit": "9.99 kB",
"import": "{ useQuery, QueryClient, QueryClientProvider }",
"ignore": ["react", "react-dom"]
Expand Down
37 changes: 2 additions & 35 deletions docs/eslint/eslint-plugin-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ bun add -D @tanstack/eslint-plugin-query

## Flat Config (`eslint.config.js`)

The plugin is ESM-only. If you use `.eslintrc`, migrate to flat config.

### Recommended setup

To enable all of the recommended rules for our plugin, add the following config:
Expand Down Expand Up @@ -79,41 +81,6 @@ export default [
]
```

## Legacy Config (`.eslintrc`)

### Recommended setup

To enable all of the recommended rules for our plugin, add `plugin:@tanstack/query/recommended` in extends:

```json
{
"extends": ["plugin:@tanstack/query/recommended"]
}
```

### Recommended strict setup

The `recommendedStrict` config extends `recommended` with additional opinionated rules:

```json
{
"extends": ["plugin:@tanstack/query/recommendedStrict"]
}
```

### Custom setup

Alternatively, add `@tanstack/query` to the plugins section, and configure the rules you want to use:

```json
{
"plugins": ["@tanstack/query"],
"rules": {
"@tanstack/query/exhaustive-deps": "error"
}
}
```

## Oxlint

The plugin can also be used with [Oxlint](https://oxc.rs/docs/guide/usage/linter) through its [JS plugins](https://oxc.rs/docs/guide/usage/linter/js-plugins) support, which is currently in alpha. Rule names are the same as in ESLint.
Expand Down
8 changes: 3 additions & 5 deletions docs/framework/preact/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,9 @@ import { Example } from './Example'
const queryClient = new QueryClient()

const PreactQueryDevtoolsProduction = lazy(() =>
import('@tanstack/preact-query-devtools/build/modern/production.js').then(
(d) => ({
default: d.PreactQueryDevtools,
}),
),
import('@tanstack/preact-query-devtools/production').then((d) => ({
default: d.PreactQueryDevtools,
})),
)

function App() {
Expand Down
8 changes: 3 additions & 5 deletions docs/framework/react/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,9 @@ import { Example } from './Example'
const queryClient = new QueryClient()

const ReactQueryDevtoolsProduction = React.lazy(() =>
import('@tanstack/react-query-devtools/build/modern/production.js').then(
(d) => ({
default: d.ReactQueryDevtools,
}),
),
import('@tanstack/react-query-devtools/production').then((d) => ({
default: d.ReactQueryDevtools,
})),
)

function App() {
Expand Down
2 changes: 2 additions & 0 deletions docs/framework/react/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ If you're not using a module bundler or package manager, you can also use this l

### Requirements

TanStack Query v6 ships ESM builds only. If your application uses webpack 4, upgrade to webpack 5 or another bundler that supports the modern build.

React Query is optimized for modern browsers. It is compatible with the following browsers config

```
Expand Down
8 changes: 0 additions & 8 deletions examples/react/eslint-legacy/.eslintrc

This file was deleted.

24 changes: 0 additions & 24 deletions examples/react/eslint-legacy/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions examples/react/eslint-legacy/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions examples/react/eslint-legacy/index.html

This file was deleted.

31 changes: 0 additions & 31 deletions examples/react/eslint-legacy/package.json

This file was deleted.

13 changes: 0 additions & 13 deletions examples/react/eslint-legacy/public/emblem-light.svg

This file was deleted.

Loading
Loading