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
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ESLint React provides the following configurations:
9
9
### `version`
10
10
11
11
```ts
12
-
exportdefault"detect"satisfiesstring
12
+
const version ="detect"satisfiesstring
13
13
```
14
14
15
15
React version to perform the analysis, `"detect"` means auto detect React version from the project's dependencies.
@@ -19,7 +19,7 @@ If failed to detect, it will use the `19.0.0` version.
19
19
### `importSource`
20
20
21
21
```ts
22
-
exportdefault"react"satisfiesstring
22
+
const importSource ="react"satisfiesstring
23
23
```
24
24
25
25
<Callouttype="info">If `importSource` is specified, an equivalent version of React should be provided to the [`version`](#version) setting.</Callout>
@@ -37,7 +37,7 @@ import React from "@pika/react";
37
37
### `polymorphicPropName`
38
38
39
39
```ts
40
-
exportdefault"as"satisfiesstring
40
+
const polymorphicPropName ="as"satisfiesstring
41
41
```
42
42
43
43
You can optionally use the `polymorphicPropName` setting to define the prop your code uses to create polymorphic components. This setting will be used determine the element type in rules that require semantic context.
<Callouttype="info">Before using `additionalComponents`, consider whether `polymorphicPropName` can be used instead, as it simpler and more efficient.</Callout>
@@ -79,7 +79,15 @@ An array of components and its attributes mapping. It allows the related rules t
79
79
For example, if you set the `additionalComponents` to:
0 commit comments