Skip to content

Commit

Permalink
chore(deps): update eslint plugins (#7984)
Browse files Browse the repository at this point in the history
* chore(deps): update eslint plugins

* Refactor shadow-dom example
  • Loading branch information
lachlancollins authored Aug 30, 2024
1 parent 9e086d8 commit 8fe9010
Show file tree
Hide file tree
Showing 18 changed files with 442 additions and 410 deletions.
1 change: 0 additions & 1 deletion examples/react/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"typescript": "5.3.3",
"vite": "^5.3.5"
}
Expand Down
18 changes: 0 additions & 18 deletions examples/react/shadow-dom/.eslintrc.cjs

This file was deleted.

19 changes: 19 additions & 0 deletions examples/react/shadow-dom/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { tanstackConfig } from '@tanstack/config/eslint'
import pluginQuery from '@tanstack/eslint-plugin-query'
import pluginReact from '@eslint-react/eslint-plugin'
import pluginReactHooks from 'eslint-plugin-react-hooks'

export default [
...tanstackConfig,
...pluginQuery.configs['flat/recommended'],
pluginReact.configs.recommended,
{
plugins: {
'react-hooks': pluginReactHooks,
},
rules: {
'react-hooks/exhaustive-deps': 'error',
'react-hooks/rules-of-hooks': 'error',
},
},
]
11 changes: 3 additions & 8 deletions examples/react/shadow-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"build": "vite build",
"preview": "vite preview",
"test:types": "tsc"
},
"dependencies": {
"@tanstack/react-query": "^5.52.3",
Expand All @@ -17,12 +17,7 @@
"devDependencies": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"typescript": "5.3.3",
"vite": "^5.3.5"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/react/shadow-dom/src/DogList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query'

type DogsResp = {
message: {
[dog: string]: string[]
[dog: string]: Array<string>
}
}

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

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

const dogs = Object.keys(data?.message)
const dogs = Object.keys(data.message)

return (
<div>
Expand Down
3 changes: 1 addition & 2 deletions examples/react/shadow-dom/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
"include": ["src", "eslint.config.js"]
}
11 changes: 0 additions & 11 deletions examples/react/shadow-dom/tsconfig.node.json

This file was deleted.

9 changes: 7 additions & 2 deletions examples/svelte/simple/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"checkJs": true,
"isolatedModules": true
},
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],
"references": [{ "path": "./tsconfig.node.json" }]
"include": [
"src/**/*.d.ts",
"src/**/*.ts",
"src/**/*.js",
"src/**/*.svelte",
"vite.config.ts"
]
}
8 changes: 0 additions & 8 deletions examples/svelte/simple/tsconfig.node.json

This file was deleted.

27 changes: 18 additions & 9 deletions examples/vue/basic/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"types": ["vite/client"]
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.vue"]
}
29 changes: 19 additions & 10 deletions examples/vue/persister/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"types": ["vite/client"]
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.vue"]
}
3 changes: 1 addition & 2 deletions integrations/vue-vite/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "vite.config.ts"],
"references": [{ "path": "./tsconfig.node.json" }]
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts"]
}
10 changes: 0 additions & 10 deletions integrations/vue-vite/tsconfig.node.json

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@cspell/eslint-plugin": "^8.12.1",
"@eslint-react/eslint-plugin": "^1.6.0",
"@cspell/eslint-plugin": "^8.14.2",
"@eslint-react/eslint-plugin": "^1.12.3",
"@solidjs/testing-library": "^0.8.9",
"@tanstack/config": "^0.11.1",
"@testing-library/jest-dom": "^6.4.8",
Expand All @@ -49,11 +49,11 @@
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@vitest/coverage-istanbul": "^2.0.4",
"@vitest/eslint-plugin": "^1.0.2",
"@vitest/eslint-plugin": "^1.1.0",
"cpy-cli": "^5.0.0",
"esbuild-plugin-file-path-extensions": "^2.1.2",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-hooks": "^5.1.0-rc-a19a8ab4-20240829",
"jsdom": "^25.0.0",
"knip": "^5.27.0",
"nx": "^19.5.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@vitejs/plugin-react": "^4.3.1",
"eslint-plugin-react-compiler": "0.0.0-experimental-c8b3f72-20240517",
"eslint-plugin-react-compiler": "0.0.0-experimental-f8a5409-20240829",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522",
"react-error-boundary": "^4.0.13"
Expand Down
2 changes: 2 additions & 0 deletions packages/react-query/src/HydrationBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable react-compiler/react-compiler */

'use client'
import * as React from 'react'

Expand Down
2 changes: 2 additions & 0 deletions packages/react-query/src/useMutationState.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable react-compiler/react-compiler */

'use client'
import * as React from 'react'

Expand Down
Loading

0 comments on commit 8fe9010

Please sign in to comment.