You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/pages/docs/configurations.mdx
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,21 +6,11 @@ ESLint React provides the following configurations:
6
6
7
7
## Settings
8
8
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
-
18
9
### `version`
19
10
20
11
(type: `string`, default: `"detect"`)
21
12
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.
24
14
25
15
### `polymorphicPropName`
26
16
@@ -56,6 +46,16 @@ An array of components and its attributes mapping. It allows the related rules t
56
46
57
47
(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)
58
48
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.
0 commit comments