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-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ export default [
26
26
27
27
<AnalyzerPropertyTypeTable />
28
28
29
-
## Property Specifications
29
+
## Basic Configuration
30
30
31
31
### `version`
32
32
@@ -45,6 +45,12 @@ Example for using `@pika/react` instead of `react`:
45
45
importReactfrom"@pika/react";
46
46
```
47
47
48
+
## Advanced Configuration
49
+
50
+
<Callouttype="warn">
51
+
The basic configuration is sufficient for the vast majority of projects. Over-reliance on advanced configuration options will reduce the portability of your code between different tooling ecosystems.
52
+
</Callout>
53
+
48
54
### `polymorphicPropName`
49
55
50
56
Defines the prop used for polymorphic components. Helps rules determine element types for semantic context.
@@ -76,8 +82,11 @@ export default [
76
82
files: ["**/*.ts", "**/*.tsx"],
77
83
settings: {
78
84
"react-x": {
85
+
// Basic configuration
79
86
version: "19.2.0", // Specify the React version for semantic analysis (can be "detect" for auto-detection)
80
87
importSource: "react", // Customize the import source for the React module (defaults to "react")
88
+
89
+
// Advanced configuration
81
90
polymorphicPropName: "as", // Define the prop name used for polymorphic components (e.g., <Component as="div">)
82
91
additionalStateHooks: "/^(useMyState|useCustomState)$/u", // Regex pattern for custom hooks treated as state hooks
0 commit comments