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: apps/website/content/docs/configuration/configure-analyzer.mdx
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ export default [
32
32
33
33
Defines the React version for semantic analysis.
34
34
35
-
-`"detect"`: Auto-detects from project dependencies (defaults to `19.1.0` if undetectable)
35
+
-`detect`: Auto-detects from project dependencies (defaults to `19.1.0` if undetectable)
36
36
-`string`: Explicit version specification (e.g., `"18.3.1"`)
37
37
38
38
### `importSource`
@@ -45,20 +45,6 @@ Example for using `@pika/react` instead of `react`:
45
45
importReactfrom"@pika/react";
46
46
```
47
47
48
-
### `skipImportCheck`
49
-
50
-
Controls whether to verify the import source when identifying React APIs.
51
-
52
-
Default is `true` (checks only API shape). When `false`, both shape and import source are verified, preventing false positives from third-party libraries with similar APIs.
53
-
54
-
```ts
55
-
import { memo } from"unrelated-library";
56
-
57
-
const NonComponentFunction =memo(() => {
58
-
// When skipImportCheck: false, this isn't recognized as React's memo
59
-
});
60
-
```
61
-
62
48
### `polymorphicPropName`
63
49
64
50
Defines the prop used for polymorphic components. Helps rules determine element types for semantic context.
@@ -73,10 +59,13 @@ Example with `polymorphicPropName` set to `as`:
73
59
### `additionalComponents` (Experimental)
74
60
75
61
<Callouttype="info">
76
-
Consider using `polymorphicPropName` instead when possible, as it's simpler and more efficient.
62
+
Consider using `polymorphicPropName` instead when possible, as it's simpler
63
+
and more efficient.
77
64
</Callout>
78
65
79
-
<Callouttype="warn">Experimental feature that may lack stability and documentation.</Callout>
66
+
<Callouttype="warn">
67
+
Experimental feature that may lack stability and documentation.
68
+
</Callout>
80
69
81
70
Maps components and their attributes for comprehensive analysis. Supports default attribute values.
82
71
@@ -102,9 +91,10 @@ This makes `<EmbedContent src="https://eslint-react.xyz" />{:tsx}` evaluate as `
102
91
### `additionalHooks` (Experimental)
103
92
104
93
<Callouttype="warn">
105
-
Intended for edge cases. We suggest to use this option **very sparingly, if at all**. Generally saying, we recommend
106
-
most custom Hooks do not vary the built-in React Hooks, and instead provide a higher-level API that is more focused
107
-
around a specific use case.
94
+
Intended for edge cases. We suggest to use this option **very sparingly, if at
95
+
all**. Generally saying, we recommend most custom Hooks do not vary the
96
+
built-in React Hooks, and instead provide a higher-level API that is more
97
+
focused around a specific use case.
108
98
</Callout>
109
99
110
100
Alias variants to built-in React Hooks for rule compatibility:
0 commit comments