Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Nov 11, 2024
2 parents b8a83fc + 6afbc09 commit 2d1b390
Show file tree
Hide file tree
Showing 37 changed files with 1,600 additions and 1,695 deletions.
20 changes: 13 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
"prettier",
"react-hooks",
"import",
"vitest",
"eslint-plugin-react-compiler"
"@vitest",
"eslint-plugin-react-compiler",
"testing-library"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down Expand Up @@ -50,10 +51,6 @@
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"vitest/consistent-test-it": [
"error",
{ "fn": "it", "withinDescribe": "it" }
],
"import/namespace": "off",
"import/named": "off",
"import/order": [
Expand Down Expand Up @@ -109,10 +106,19 @@
},
"overrides": [
{
"extends": [
"plugin:testing-library/react",
"plugin:@vitest/legacy-recommended"
],
"files": ["tests/**/*.ts", "tests/**/*.tsx"],
"rules": {
"import/extensions": ["error", "never"],
"@typescript-eslint/no-unused-vars": "off"
"@typescript-eslint/no-unused-vars": "off",
"@vitest/expect-expect": "off",
"@vitest/consistent-test-it": [
"error",
{ "fn": "it", "withinDescribe": "it" }
]
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/immer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Check this example with withImmer:
This hook takes an atom and replaces the atom's `writeFunction` with the new immer-like `writeFunction` like the previous helpers.

```jsx
import { useAtom } from 'jotai'
import { atom } from 'jotai'
import { useImmerAtom } from 'jotai-immer'

const primitiveAtom = atom({ value: 0 })
Expand Down
3 changes: 3 additions & 0 deletions docs/extensions/location.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ atomWithLocation(options): PrimitiveAtom

`atomWithLocation` creates a new atom that links to `window.location`.

Typically, you should only instantiate `atomWithLocation` once per application. This is because changes made to one instance might not be reflected in others.
As this atom is designed to synchronize with the `window.location` object, using multiple instances can lead to unpredictable behavior.

### Parameters

**options** (optional): an object of options to customize the behavior of the atom
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
"@typescript-eslint/eslint-plugin": "^8.9.0",
"@typescript-eslint/parser": "^8.9.0",
"@vitest/coverage-v8": "^2.1.3",
"@vitest/eslint-plugin": "^1.1.7",
"@vitest/ui": "^2.1.3",
"benny": "^3.7.1",
"downlevel-dts": "^0.11.0",
Expand All @@ -150,7 +151,7 @@
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-compiler": "0.0.0-experimental-fa06e2c-20241014",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-vitest": "^0.5.4",
"eslint-plugin-testing-library": "^6.4.0",
"jest-leak-detector": "^29.7.0",
"jsdom": "^25.0.1",
"json": "^11.0.0",
Expand Down
143 changes: 97 additions & 46 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2d1b390

Please sign in to comment.