Skip to content

Commit 082bfe4

Browse files
committed
docs: minor improvements
1 parent 99d75b5 commit 082bfe4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

website/pages/docs/advanced-configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default [
1616
...eslintReact.configs.recommended,
1717
settings: {
1818
"react-x": {
19+
version: "19.0.0",
1920
importSource: "react",
2021
additionalHooks: {
2122
useLayoutEffect: ["useIsomorphicLayoutEffect"],
@@ -66,7 +67,6 @@ export default [
6667
],
6768
},
6869
],
69-
version: "detect",
7070
},
7171
},
7272
},

website/pages/docs/configurations.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,11 @@ ESLint React provides the following configurations:
66

77
## Settings
88

9-
### `importSource`
10-
11-
(type: `string`, default: `"react"`)
12-
13-
The source where React is imported from.\
14-
This allows to specify a custom import location for React when not using the official distribution.
15-
16-
(e.g. `@pika/react`, etc)
17-
189
### `version`
1910

2011
(type: `string`, default: `"detect"`)
2112

22-
React version to use, `"detect"` means auto detect React version from the project's dependencies.\
23-
If `importSource` is specified, an equivalent version of React should be provided here.
13+
React version to use, `"detect"` means auto detect React version from the project's dependencies.
2414

2515
### `polymorphicPropName`
2616

@@ -56,6 +46,16 @@ An array of components and its attributes mapping. It allows the related rules t
5646

5747
(e.g. The `[{ name: "EmbedContent", as: "iframe", attributes: [{ name: "sandbox", defaultValue: "" }] }]` demystifies an `<EmbedContent src="https://eslint-react.xyz" />` as an `<iframe src="https://eslint-react.xyz" sandbox="" />`, so that both the `dom/no-missing-iframe-sandbox` and `dom/no-unsafe-iframe-sandbox` rules can perform checks on it)
5848

49+
### `importSource`
50+
51+
(type: `string`, default: `"react"`)
52+
53+
The source where React is imported from.\
54+
This allows to specify a custom import location for React when not using the official distribution.\
55+
If `importSource` is specified, an equivalent version of React should be provided to the [`version`](#version) setting.
56+
57+
(e.g. `@pika/react`, etc)
58+
5959
## Examples
6060

6161
```ts filename="eslint.config.js"
@@ -68,6 +68,7 @@ export default [
6868
...eslintReact.configs.recommended,
6969
settings: {
7070
"react-x": {
71+
version: "19.0.0",
7172
additionalHooks: {
7273
useLayoutEffect: ["useIsomorphicLayoutEffect"],
7374
},
@@ -87,7 +88,6 @@ export default [
8788
],
8889
},
8990
],
90-
version: "detect",
9191
},
9292
},
9393
},

0 commit comments

Comments
 (0)