Skip to content

Commit 758429f

Browse files
authored
Merge branch 'main' into main
2 parents 080a8e9 + 37878da commit 758429f

8 files changed

Lines changed: 39 additions & 58 deletions

File tree

docs/guides/tutorial-tic-tac-toe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ export default function Game() {
13131313

13141314
function jumpTo(nextMove) {
13151315
setCurrentMove(nextMove)
1316-
setXIsNext(currentMove % 2 === 0)
1316+
setXIsNext(nextMove % 2 === 0)
13171317
}
13181318

13191319
return (

docs/hooks/use-store-with-equality-fn.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ given tab.
709709

710710
```tsx
711711
const useCounterStore = <U,>(
712-
currentTabIndex: number,
712+
key: string,
713713
selector: (state: CounterStore) => U,
714714
) => {
715715
const stores = useContext(CounterStoresContext)
@@ -719,15 +719,11 @@ const useCounterStore = <U,>(
719719
}
720720

721721
const getOrCreateCounterStoreByKey = useCallback(
722-
() => createCounterStoreFactory(stores),
722+
(key: string) => createCounterStoreFactory(stores!)(key),
723723
[stores],
724724
)
725725

726-
return useStoreWithEqualityFn(
727-
getOrCreateCounterStoreByKey(`tab-${currentTabIndex}`),
728-
selector,
729-
shallow,
730-
)
726+
return useStore(getOrCreateCounterStoreByKey(key), selector)
731727
}
732728
```
733729

eslint.config.mjs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import vitest from '@vitest/eslint-plugin'
33
import importPlugin from 'eslint-plugin-import'
44
import jestDom from 'eslint-plugin-jest-dom'
55
import react from 'eslint-plugin-react'
6-
import reactCompiler from 'eslint-plugin-react-compiler'
76
import reactHooks from 'eslint-plugin-react-hooks'
87
import testingLibrary from 'eslint-plugin-testing-library'
98
import tseslint from 'typescript-eslint'
@@ -17,8 +16,7 @@ export default tseslint.config(
1716
tseslint.configs.recommended,
1817
react.configs.flat.recommended,
1918
react.configs.flat['jsx-runtime'],
20-
reactHooks.configs['recommended-latest'],
21-
reactCompiler.configs.recommended,
19+
reactHooks.configs.recommended,
2220
{
2321
settings: {
2422
react: {
@@ -42,7 +40,7 @@ export default tseslint.config(
4240
'import/namespace': 'off',
4341
'import/no-named-as-default-member': 'off',
4442
'import/no-duplicates': 'error',
45-
'import/extensions': ['error', 'always'],
43+
'import/extensions': ['error', 'always', { ignorePackages: true }],
4644
'import/order': [
4745
'error',
4846
{
@@ -72,6 +70,7 @@ export default tseslint.config(
7270
'warn',
7371
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
7472
],
73+
'react-hooks/react-compiler': 'error',
7574
},
7675
},
7776
{
@@ -90,10 +89,4 @@ export default tseslint.config(
9089
],
9190
},
9291
},
93-
{
94-
files: ['*.js'],
95-
rules: {
96-
'@typescript-eslint/no-require-imports': 'off',
97-
},
98-
},
9992
)

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@
137137
"eslint-plugin-import": "^2.31.0",
138138
"eslint-plugin-jest-dom": "^5.5.0",
139139
"eslint-plugin-react": "^7.37.5",
140-
"eslint-plugin-react-compiler": "19.1.0-rc.1",
141-
"eslint-plugin-react-hooks": "^5.2.0",
140+
"eslint-plugin-react-hooks": "6.0.0-rc.1",
142141
"eslint-plugin-testing-library": "^7.1.1",
143142
"immer": "^10.1.1",
144143
"jsdom": "^26.1.0",

pnpm-lock.yaml

Lines changed: 30 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/traditional.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react'
2-
// eslint-disable-next-line import/extensions
32
import useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector'
43
import { createStore } from './vanilla.ts'
54
import type {

tests/middlewareTypes.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint @typescript-eslint/no-unused-expressions: off */ // FIXME
2-
/* eslint react-compiler/react-compiler: off */
2+
/* eslint react-hooks/react-compiler: off */
33

44
import { describe, expect, expectTypeOf, it } from 'vitest'
55
import { create } from 'zustand'

vitest.config.mts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { resolve } from 'path'
2-
// eslint-disable-next-line import/extensions
32
import { defineConfig } from 'vitest/config'
43

54
export default defineConfig({

0 commit comments

Comments
 (0)