Skip to content

Commit 8fe9010

Browse files
chore(deps): update eslint plugins (#7984)
* chore(deps): update eslint plugins * Refactor shadow-dom example
1 parent 9e086d8 commit 8fe9010

18 files changed

+442
-410
lines changed

examples/react/basic/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"@types/react": "^18.2.79",
2222
"@types/react-dom": "^18.2.25",
2323
"@vitejs/plugin-react": "^4.3.1",
24-
"eslint": "^8.57.0",
2524
"typescript": "5.3.3",
2625
"vite": "^5.3.5"
2726
}

examples/react/shadow-dom/.eslintrc.cjs

-18
This file was deleted.
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { tanstackConfig } from '@tanstack/config/eslint'
2+
import pluginQuery from '@tanstack/eslint-plugin-query'
3+
import pluginReact from '@eslint-react/eslint-plugin'
4+
import pluginReactHooks from 'eslint-plugin-react-hooks'
5+
6+
export default [
7+
...tanstackConfig,
8+
...pluginQuery.configs['flat/recommended'],
9+
pluginReact.configs.recommended,
10+
{
11+
plugins: {
12+
'react-hooks': pluginReactHooks,
13+
},
14+
rules: {
15+
'react-hooks/exhaustive-deps': 'error',
16+
'react-hooks/rules-of-hooks': 'error',
17+
},
18+
},
19+
]

examples/react/shadow-dom/package.json

+3-8
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"type": "module",
55
"scripts": {
66
"dev": "vite",
7-
"build": "tsc && vite build",
8-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
9-
"preview": "vite preview"
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"test:types": "tsc"
1010
},
1111
"dependencies": {
1212
"@tanstack/react-query": "^5.52.3",
@@ -17,12 +17,7 @@
1717
"devDependencies": {
1818
"@types/react": "npm:types-react@rc",
1919
"@types/react-dom": "npm:types-react-dom@rc",
20-
"@typescript-eslint/eslint-plugin": "^7.17.0",
21-
"@typescript-eslint/parser": "^7.17.0",
2220
"@vitejs/plugin-react": "^4.3.1",
23-
"eslint": "^8.57.0",
24-
"eslint-plugin-react-hooks": "^4.6.2",
25-
"eslint-plugin-react-refresh": "^0.4.9",
2621
"typescript": "5.3.3",
2722
"vite": "^5.3.5"
2823
}

examples/react/shadow-dom/src/DogList.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query'
22

33
type DogsResp = {
44
message: {
5-
[dog: string]: string[]
5+
[dog: string]: Array<string>
66
}
77
}
88

@@ -22,7 +22,7 @@ export const DogList = () => {
2222

2323
if (status === 'error') return 'Error!'
2424

25-
const dogs = Object.keys(data?.message)
25+
const dogs = Object.keys(data.message)
2626

2727
return (
2828
<div>

examples/react/shadow-dom/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@
2020
"noUnusedParameters": true,
2121
"noFallthroughCasesInSwitch": true
2222
},
23-
"include": ["src"],
24-
"references": [{ "path": "./tsconfig.node.json" }]
23+
"include": ["src", "eslint.config.js"]
2524
}

examples/react/shadow-dom/tsconfig.node.json

-11
This file was deleted.

examples/svelte/simple/tsconfig.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
"checkJs": true,
1616
"isolatedModules": true
1717
},
18-
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],
19-
"references": [{ "path": "./tsconfig.node.json" }]
18+
"include": [
19+
"src/**/*.d.ts",
20+
"src/**/*.ts",
21+
"src/**/*.js",
22+
"src/**/*.svelte",
23+
"vite.config.ts"
24+
]
2025
}

examples/svelte/simple/tsconfig.node.json

-8
This file was deleted.

examples/vue/basic/tsconfig.json

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
{
22
"compilerOptions": {
3-
"target": "esnext",
4-
"module": "esnext",
5-
"moduleResolution": "node",
6-
"strict": true,
7-
"jsx": "preserve",
8-
"sourceMap": true,
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"module": "ESNext",
6+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7+
"skipLibCheck": true,
8+
9+
/* Bundler mode */
10+
"moduleResolution": "Bundler",
11+
"allowImportingTsExtensions": true,
912
"resolveJsonModule": true,
10-
"esModuleInterop": true,
11-
"lib": ["esnext", "dom"],
12-
"types": ["vite/client"]
13+
"isolatedModules": true,
14+
"noEmit": true,
15+
"jsx": "preserve",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
1322
},
1423
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.vue"]
1524
}

examples/vue/persister/tsconfig.json

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
{
22
"compilerOptions": {
3-
"target": "esnext",
4-
"module": "esnext",
5-
"moduleResolution": "node",
6-
"strict": true,
7-
"jsx": "preserve",
8-
"sourceMap": true,
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"module": "ESNext",
6+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7+
"skipLibCheck": true,
8+
9+
/* Bundler mode */
10+
"moduleResolution": "Bundler",
11+
"allowImportingTsExtensions": true,
912
"resolveJsonModule": true,
10-
"esModuleInterop": true,
11-
"lib": ["esnext", "dom"],
12-
"types": ["vite/client"]
13+
"isolatedModules": true,
14+
"noEmit": true,
15+
"jsx": "preserve",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
1322
},
14-
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
23+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.vue"]
1524
}

integrations/vue-vite/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@
2020
"noUnusedParameters": true,
2121
"noFallthroughCasesInSwitch": true
2222
},
23-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "vite.config.ts"],
24-
"references": [{ "path": "./tsconfig.node.json" }]
23+
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts"]
2524
}

integrations/vue-vite/tsconfig.node.json

-10
This file was deleted.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
},
3939
"devDependencies": {
4040
"@arethetypeswrong/cli": "^0.15.3",
41-
"@cspell/eslint-plugin": "^8.12.1",
42-
"@eslint-react/eslint-plugin": "^1.6.0",
41+
"@cspell/eslint-plugin": "^8.14.2",
42+
"@eslint-react/eslint-plugin": "^1.12.3",
4343
"@solidjs/testing-library": "^0.8.9",
4444
"@tanstack/config": "^0.11.1",
4545
"@testing-library/jest-dom": "^6.4.8",
@@ -49,11 +49,11 @@
4949
"@types/react": "npm:types-react@rc",
5050
"@types/react-dom": "npm:types-react-dom@rc",
5151
"@vitest/coverage-istanbul": "^2.0.4",
52-
"@vitest/eslint-plugin": "^1.0.2",
52+
"@vitest/eslint-plugin": "^1.1.0",
5353
"cpy-cli": "^5.0.0",
5454
"esbuild-plugin-file-path-extensions": "^2.1.2",
5555
"eslint": "^8.57.0",
56-
"eslint-plugin-react-hooks": "^4.6.2",
56+
"eslint-plugin-react-hooks": "^5.1.0-rc-a19a8ab4-20240829",
5757
"jsdom": "^25.0.0",
5858
"knip": "^5.27.0",
5959
"nx": "^19.5.3",

packages/react-query/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@types/react": "npm:types-react@rc",
6666
"@types/react-dom": "npm:types-react-dom@rc",
6767
"@vitejs/plugin-react": "^4.3.1",
68-
"eslint-plugin-react-compiler": "0.0.0-experimental-c8b3f72-20240517",
68+
"eslint-plugin-react-compiler": "0.0.0-experimental-f8a5409-20240829",
6969
"react": "19.0.0-rc-4c2e457c7c-20240522",
7070
"react-dom": "19.0.0-rc-4c2e457c7c-20240522",
7171
"react-error-boundary": "^4.0.13"

packages/react-query/src/HydrationBoundary.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable react-compiler/react-compiler */
2+
13
'use client'
24
import * as React from 'react'
35

packages/react-query/src/useMutationState.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable react-compiler/react-compiler */
2+
13
'use client'
24
import * as React from 'react'
35

0 commit comments

Comments
 (0)