Skip to content

Commit c6c324a

Browse files
committed
Update documentation for analyzer configuration: clarify sections and add warnings for advanced options
1 parent 6c46ac7 commit c6c324a

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

apps/website/content/docs/configuration/configure-analyzer.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default [
2626

2727
<AnalyzerPropertyTypeTable />
2828

29-
## Property Specifications
29+
## Basic Configuration
3030

3131
### `version`
3232

@@ -45,6 +45,12 @@ Example for using `@pika/react` instead of `react`:
4545
import React from "@pika/react";
4646
```
4747

48+
## Advanced Configuration
49+
50+
<Callout type="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+
4854
### `polymorphicPropName`
4955

5056
Defines the prop used for polymorphic components. Helps rules determine element types for semantic context.
@@ -76,8 +82,11 @@ export default [
7682
files: ["**/*.ts", "**/*.tsx"],
7783
settings: {
7884
"react-x": {
85+
// Basic configuration
7986
version: "19.2.0", // Specify the React version for semantic analysis (can be "detect" for auto-detection)
8087
importSource: "react", // Customize the import source for the React module (defaults to "react")
88+
89+
// Advanced configuration
8190
polymorphicPropName: "as", // Define the prop name used for polymorphic components (e.g., <Component as="div">)
8291
additionalStateHooks: "/^(useMyState|useCustomState)$/u", // Regex pattern for custom hooks treated as state hooks
8392
},

0 commit comments

Comments
 (0)