Skip to content

Commit 612d5b6

Browse files
authored
Optimize documentation and remove unused component related code (#1338)
1 parent 051db1a commit 612d5b6

26 files changed

+261
-228
lines changed

packages/core/docs/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
- [ComponentKind](type-aliases/ComponentKind.md)
2727
- [ComponentLifecyclePhaseKind](type-aliases/ComponentLifecyclePhaseKind.md)
2828
- [ComponentPhaseKind](type-aliases/ComponentPhaseKind.md)
29-
- [ComponentStateKind](type-aliases/ComponentStateKind.md)
3029
- [JsxAttributeValue](type-aliases/JsxAttributeValue.md)
3130
- [JsxDetectionHint](type-aliases/JsxDetectionHint.md)
3231

@@ -118,8 +117,6 @@
118117
- [getJsxElementType](functions/getJsxElementType.md)
119118
- [getPhaseKindOfFunction](functions/getPhaseKindOfFunction.md)
120119
- [hasNoneOrLooseComponentName](functions/hasNoneOrLooseComponentName.md)
121-
- [isAssignmentToThisState](functions/isAssignmentToThisState.md)
122-
- [isChildrenOfCreateElement](functions/isChildrenOfCreateElement.md)
123120
- [isClassComponent](functions/isClassComponent.md)
124121
- [isComponentDefinition](functions/isComponentDefinition.md)
125122
- [isComponentName](functions/isComponentName.md)
@@ -129,7 +126,6 @@
129126
- [isDeclaredInRenderPropLoose](functions/isDeclaredInRenderPropLoose.md)
130127
- [isFunctionOfComponentDidMount](functions/isFunctionOfComponentDidMount.md)
131128
- [isFunctionOfComponentWillUnmount](functions/isFunctionOfComponentWillUnmount.md)
132-
- [isFunctionOfRenderMethod](functions/isFunctionOfRenderMethod.md)
133129
- [isFunctionOfUseEffectCleanup](functions/isFunctionOfUseEffectCleanup.md)
134130
- [isFunctionOfUseEffectSetup](functions/isFunctionOfUseEffectSetup.md)
135131
- [isInitializedFromReact](functions/isInitializedFromReact.md)
@@ -149,7 +145,6 @@
149145
- [isRenderFunctionLoose](functions/isRenderFunctionLoose.md)
150146
- [isRenderMethodLike](functions/isRenderMethodLike.md)
151147
- [isRenderPropLoose](functions/isRenderPropLoose.md)
152-
- [isThisSetState](functions/isThisSetState.md)
153148
- [isUseEffectLikeCall](functions/isUseEffectLikeCall.md)
154149
- [resolveJsxAttributeValue](functions/resolveJsxAttributeValue.md)
155150
- [stringifyJsx](functions/stringifyJsx.md)

packages/core/docs/functions/getComponentNameFromId.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
function getComponentNameFromId(id: Identifier | Identifier[] | undefined): string | undefined;
77
```
88

9+
Get component name from an identifier or identifier sequence (e.g., MemberExpression)
10+
911
## Parameters
1012

11-
| Parameter | Type |
12-
| ------ | ------ |
13-
| `id` | `Identifier` \| `Identifier`[] \| `undefined` |
13+
| Parameter | Type | Description |
14+
| ------ | ------ | ------ |
15+
| `id` | `Identifier` \| `Identifier`[] \| `undefined` | The identifier or identifier sequence |
1416

1517
## Returns
1618

packages/core/docs/functions/hasNoneOrLooseComponentName.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
function hasNoneOrLooseComponentName(context: RuleContext, fn: TSESTreeFunction): boolean;
77
```
88

9+
Check if the function has no name or a loose component name
10+
911
## Parameters
1012

11-
| Parameter | Type |
12-
| ------ | ------ |
13-
| `context` | `RuleContext` |
14-
| `fn` | `TSESTreeFunction` |
13+
| Parameter | Type | Description |
14+
| ------ | ------ | ------ |
15+
| `context` | `RuleContext` | The rule context |
16+
| `fn` | `TSESTreeFunction` | The function node |
1517

1618
## Returns
1719

packages/core/docs/functions/isAssignmentToThisState.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

packages/core/docs/functions/isChildrenOfCreateElement.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/core/docs/functions/isComponentDefinition.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Determines if a function node represents a valid React component definition
1616
| Parameter | Type | Description |
1717
| ------ | ------ | ------ |
1818
| `context` | `RuleContext` | The rule context |
19-
| `node` | `TSESTreeFunction` | The function node to check |
20-
| `hint` | `bigint` | Component detection hints as bit flags |
19+
| `node` | `TSESTreeFunction` | The function node to analyze |
20+
| `hint` | `bigint` | Component detection hints (bit flags) to customize detection logic |
2121

2222
## Returns
2323

2424
`boolean`
2525

26-
`true` if the node is a valid component definition, `false` otherwise
26+
`true` if the node is considered a component definition

packages/core/docs/functions/isComponentName.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
function isComponentName(name: string): boolean;
77
```
88

9+
Check if a string matches the strict component name pattern
10+
911
## Parameters
1012

11-
| Parameter | Type |
12-
| ------ | ------ |
13-
| `name` | `string` |
13+
| Parameter | Type | Description |
14+
| ------ | ------ | ------ |
15+
| `name` | `string` | The name to check |
1416

1517
## Returns
1618

packages/core/docs/functions/isComponentNameLoose.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
function isComponentNameLoose(name: string): boolean;
77
```
88

9+
Check if a string matches the loose component name pattern
10+
911
## Parameters
1012

11-
| Parameter | Type |
12-
| ------ | ------ |
13-
| `name` | `string` |
13+
| Parameter | Type | Description |
14+
| ------ | ------ | ------ |
15+
| `name` | `string` | The name to check |
1416

1517
## Returns
1618

packages/core/docs/functions/isFunctionOfRenderMethod.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

packages/core/docs/functions/isThisSetState.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)