Skip to content

Commit 3f75dea

Browse files
committed
Merge branch 'main' into fix/bug-2697
2 parents 2ac5e32 + 7d4da51 commit 3f75dea

File tree

6 files changed

+115
-56
lines changed

6 files changed

+115
-56
lines changed

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,14 @@
111111
{
112112
"files": ["tests/**/*.ts", "tests/**/*.tsx"],
113113
"rules": {
114-
"import/extensions": ["error", "never"]
114+
"import/extensions": ["error", "never"],
115+
"@typescript-eslint/no-unused-vars": "off"
115116
}
116117
},
117118
{
118119
"files": ["./*.js"],
119120
"rules": {
120-
"@typescript-eslint/no-var-requires": "off"
121+
"@typescript-eslint/no-require-imports": "off"
121122
}
122123
}
123124
]

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@
7474
"build:react:utils": "rollup -c --config-react_utils --client-only",
7575
"postbuild": "pnpm patch-d-ts && pnpm copy && pnpm patch-ts3.8 && pnpm patch-old-ts && pnpm patch-esm-ts && pnpm patch-readme",
7676
"prettier": "prettier '*.{js,json,md}' '{src,tests,benchmarks,docs}/**/*.{ts,tsx,md,mdx}' --write",
77-
"eslint": "eslint --fix --no-eslintrc --c .eslintrc.json '*.{js,json,ts}' '{src,tests,benchmarks}/**/*.{ts,tsx}'",
77+
"eslint": "eslint --fix --no-eslintrc --c .eslintrc.json '*.{js,ts}' '{src,tests,benchmarks}/**/*.{ts,tsx}'",
7878
"test": "pnpm run '/^test:.*/'",
7979
"test:format": "prettier '*.{js,json,md}' '{src,tests,benchmarks,docs}/**/*.{ts,tsx,md,mdx}' --list-different",
8080
"test:types": "tsc --noEmit",
81-
"test:lint": "eslint --no-eslintrc --c .eslintrc.json '*.{js,json,ts}' '{src,tests,benchmarks}/**/*.{ts,tsx}'",
81+
"test:lint": "eslint --no-eslintrc --c .eslintrc.json '*.{js,ts}' '{src,tests,benchmarks}/**/*.{ts,tsx}'",
8282
"test:spec": "vitest run",
8383
"test-build:spec": "vitest run",
8484
"patch-d-ts": "node -e \"var {entries}=require('./rollup.config.js');require('shelljs').find('dist/**/*.d.ts').forEach(f=>{entries.forEach(({find,replacement})=>require('shelljs').sed('-i',new RegExp(' from \\''+find.source.slice(0,-1)+'\\';$'),' from \\''+replacement+'\\';',f));require('shelljs').sed('-i',/ from '(\\.[^']+)\\.ts';$/,' from \\'\\$1\\';',f)})\"",
@@ -137,8 +137,8 @@
137137
"@types/node": "^22.1.0",
138138
"@types/react": "^18.3.3",
139139
"@types/react-dom": "^18.3.0",
140-
"@typescript-eslint/eslint-plugin": "^7.18.0",
141-
"@typescript-eslint/parser": "^7.18.0",
140+
"@typescript-eslint/eslint-plugin": "^8.0.1",
141+
"@typescript-eslint/parser": "^8.0.1",
142142
"@vitest/coverage-v8": "^2.0.5",
143143
"@vitest/ui": "^2.0.5",
144144
"benny": "^3.7.1",

pnpm-lock.yaml

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

tests/react/types.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expectType } from 'ts-expect'
22
import type { TypeEqual } from 'ts-expect'
3-
import { it } from 'vitest'
3+
import { expect, it } from 'vitest'
44
import { useAtom, useSetAtom } from 'jotai/react'
55
import { atom } from 'jotai/vanilla'
66

@@ -29,7 +29,7 @@ it('useAtom should return the correct types', () => {
2929
})
3030
expectType<[null, (arg: number) => void]>(useAtom(writeonlyDerivedAtom))
3131
}
32-
Component
32+
expect(Component).toBeDefined()
3333
})
3434

3535
it('useAtom should handle inference of atoms (#1831 #1387)', () => {
@@ -67,7 +67,7 @@ it('useAtom should handle inference of atoms (#1831 #1387)', () => {
6767
>
6868
>(true)
6969
}
70-
Component
70+
expect(Component).toBeDefined()
7171
})
7272

7373
it('useAtom should handle inference of read-only atoms', () => {
@@ -84,7 +84,7 @@ it('useAtom should handle inference of read-only atoms', () => {
8484
expectType<[number, never]>(useField('age'))
8585
expectType<[boolean, never]>(useField('checked'))
8686
}
87-
Component
87+
expect(Component).toBeDefined()
8888
})
8989

9090
it('useSetAtom should handle inference of atoms', () => {
@@ -119,7 +119,7 @@ it('useSetAtom should handle inference of atoms', () => {
119119
>
120120
>(true)
121121
}
122-
Component
122+
expect(Component).toBeDefined()
123123
})
124124

125125
it('useAtom should handle primitive atom with one type argeument', () => {
@@ -134,5 +134,5 @@ it('useAtom should handle primitive atom with one type argeument', () => {
134134
>
135135
>(true)
136136
}
137-
Component
137+
expect(Component).toBeDefined()
138138
})

tests/react/utils/types.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { it } from 'vitest'
1+
import { expect, it } from 'vitest'
22
import { useHydrateAtoms } from 'jotai/react/utils'
33
import { atom } from 'jotai/vanilla'
44

@@ -31,5 +31,5 @@ it('useHydrateAtoms should not allow invalid atom types when array is passed', (
3131
[activeAtom, false],
3232
])
3333
}
34-
Component
34+
expect(Component).toBeDefined()
3535
})

0 commit comments

Comments
 (0)