Skip to content

Commit 9354df0

Browse files
committed
refactor: code optimizations
1 parent 37ca52f commit 9354df0

File tree

23 files changed

+180
-186
lines changed

23 files changed

+180
-186
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ function useAuth() {
965965
- Improve `utilities/jsx/is-jsx-value` to better distinguish between normal values and JSX values
966966
- Improve `core/component-collector` to better distinguish between normal functions and components
967967
- Prevent potential function component detection related false positives
968-
- Switch to a more appropriate value for `DEFAULT_COMPONENT_HINT`
968+
- Switch to a more appropriate value for `DEFAULT_COMPONENT_DETECTION_HINT`
969969

970970
## v1.5.19 (30 Sun Jun 2024)
971971

apps/website/content/docs/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ function useAuth() {
969969
- Improve `utilities/jsx/is-jsx-value` to better distinguish between normal values and JSX values
970970
- Improve `core/component-collector` to better distinguish between normal functions and components
971971
- Prevent potential function component detection related false positives
972-
- Switch to a more appropriate value for `DEFAULT_COMPONENT_HINT`
972+
- Switch to a more appropriate value for `DEFAULT_COMPONENT_DETECTION_HINT`
973973

974974
## v1.5.19 (30 Sun Jun 2024)
975975

packages/core/docs/@eslint-react/namespaces/useComponentCollector/type-aliases/Options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424

2525
### hint?
2626

27-
> `optional` **hint**: [`ComponentCollectorHint`](../../../../type-aliases/ComponentCollectorHint.md)
27+
> `optional` **hint**: [`ComponentDetectionHint`](../../../../type-aliases/ComponentDetectionHint.md)

packages/core/docs/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
## Type Aliases
2222

2323
- [Component](type-aliases/Component.md)
24-
- [ComponentCollectorHint](type-aliases/ComponentCollectorHint.md)
24+
- [ComponentDetectionHint](type-aliases/ComponentDetectionHint.md)
2525
- [ComponentEffectPhaseKind](type-aliases/ComponentEffectPhaseKind.md)
2626
- [ComponentFlag](type-aliases/ComponentFlag.md)
2727
- [ComponentKind](type-aliases/ComponentKind.md)
@@ -33,10 +33,10 @@
3333

3434
## Variables
3535

36-
- [ComponentCollectorHint](variables/ComponentCollectorHint.md)
36+
- [ComponentDetectionHint](variables/ComponentDetectionHint.md)
3737
- [ComponentFlag](variables/ComponentFlag.md)
3838
- [ComponentPhaseRelevance](variables/ComponentPhaseRelevance.md)
39-
- [DEFAULT\_COMPONENT\_HINT](variables/DEFAULT_COMPONENT_HINT.md)
39+
- [DEFAULT\_COMPONENT\_DETECTION\_HINT](variables/DEFAULT_COMPONENT_DETECTION_HINT.md)
4040
- [DISPLAY\_NAME\_ASSIGNMENT\_SELECTOR](variables/DISPLAY_NAME_ASSIGNMENT_SELECTOR.md)
4141
- [isChildrenCount](variables/isChildrenCount.md)
4242
- [isChildrenCountCall](variables/isChildrenCountCall.md)
@@ -125,6 +125,7 @@
125125
- [isRenderPropLoose](functions/isRenderPropLoose.md)
126126
- [isThisSetState](functions/isThisSetState.md)
127127
- [isUseEffectCallLoose](functions/isUseEffectCallLoose.md)
128+
- [isValidComponentDefinition](functions/isValidComponentDefinition.md)
128129
- [useComponentCollector](functions/useComponentCollector.md)
129130
- [useComponentCollectorLegacy](functions/useComponentCollectorLegacy.md)
130131
- [useHookCollector](functions/useHookCollector.md)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[**@eslint-react/core**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/core](../README.md) / isValidComponentDefinition
6+
7+
# Function: isValidComponentDefinition()
8+
9+
> **isValidComponentDefinition**(`context`, `node`, `hint`): `boolean`
10+
11+
## Parameters
12+
13+
### context
14+
15+
`RuleContext`
16+
17+
### node
18+
19+
`TSESTreeFunction`
20+
21+
### hint
22+
23+
`bigint`
24+
25+
## Returns
26+
27+
`boolean`

packages/core/docs/type-aliases/ComponentCollectorHint.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[**@eslint-react/core**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/core](../README.md) / ComponentDetectionHint
6+
7+
# Type Alias: ComponentDetectionHint
8+
9+
> **ComponentDetectionHint** = `bigint`

packages/core/docs/variables/ComponentCollectorHint.md renamed to packages/core/docs/variables/ComponentDetectionHint.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
***
44

5-
[@eslint-react/core](../README.md) / ComponentCollectorHint
5+
[@eslint-react/core](../README.md) / ComponentDetectionHint
66

7-
# Variable: ComponentCollectorHint
7+
# Variable: ComponentDetectionHint
88

9-
> **ComponentCollectorHint**: `object`
9+
> **ComponentDetectionHint**: `object`
1010
1111
Hints for component collector
1212

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[**@eslint-react/core**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/core](../README.md) / DEFAULT\_COMPONENT\_DETECTION\_HINT
6+
7+
# Variable: DEFAULT\_COMPONENT\_DETECTION\_HINT
8+
9+
> `const` **DEFAULT\_COMPONENT\_DETECTION\_HINT**: `bigint`
10+
11+
Default component detection hint

packages/core/docs/variables/DEFAULT_COMPONENT_HINT.md

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

0 commit comments

Comments
 (0)