Skip to content

Commit ba79dba

Browse files
Rel1cxRel1cxCopilot
authored
Rename component detection hints (#1482)
Co-authored-by: Rel1cx <solflamex@hotmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
1 parent 6bda11e commit ba79dba

43 files changed

Lines changed: 468 additions & 423 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ type Options = {
1313

1414
| Property | Type |
1515
| ------ | ------ |
16-
| <a id="collectdisplayname"></a> `collectDisplayName?` | `boolean` |
17-
| <a id="hint"></a> `hint?` | [`ComponentDetectionHint`](../../../../type-aliases/ComponentDetectionHint.md) |
16+
| <a id="property-collectdisplayname"></a> `collectDisplayName?` | `boolean` |
17+
| <a id="property-hint"></a> `hint?` | [`ComponentDetectionHint`](../../../../type-aliases/ComponentDetectionHint.md) |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ type ReturnType = {
1717

1818
| Property | Type |
1919
| ------ | ------ |
20-
| <a id="ctx"></a> `ctx` | \{ `getAllComponents`: (`node`: `TSESTree.Program`) => [`FunctionComponentSemanticNode`](../../../../interfaces/FunctionComponentSemanticNode.md)[]; `getCurrentEntries`: () => `FunctionEntry`[]; `getCurrentEntry`: () => `FunctionEntry` \| `unit`; \} |
20+
| <a id="property-ctx"></a> `ctx` | \{ `getAllComponents`: (`node`: `TSESTree.Program`) => [`FunctionComponentSemanticNode`](../../../../interfaces/FunctionComponentSemanticNode.md)[]; `getCurrentEntries`: () => `FunctionEntry`[]; `getCurrentEntry`: () => `FunctionEntry` \| `unit`; \} |
2121
| `ctx.getAllComponents` | (`node`: `TSESTree.Program`) => [`FunctionComponentSemanticNode`](../../../../interfaces/FunctionComponentSemanticNode.md)[] |
2222
| `ctx.getCurrentEntries` | () => `FunctionEntry`[] |
2323
| `ctx.getCurrentEntry` | () => `FunctionEntry` \| `unit` |
24-
| <a id="visitor"></a> `visitor` | `ESLintUtils.RuleListener` |
24+
| <a id="property-visitor"></a> `visitor` | `ESLintUtils.RuleListener` |

packages/core/docs/@eslint-react/namespaces/useComponentCollectorLegacy/type-aliases/ReturnType.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ type ReturnType = {
1515

1616
| Property | Type |
1717
| ------ | ------ |
18-
| <a id="ctx"></a> `ctx` | \{ `getAllComponents`: (`node`: `TSESTree.Program`) => [`ClassComponentSemanticNode`](../../../../interfaces/ClassComponentSemanticNode.md)[]; \} |
18+
| <a id="property-ctx"></a> `ctx` | \{ `getAllComponents`: (`node`: `TSESTree.Program`) => [`ClassComponentSemanticNode`](../../../../interfaces/ClassComponentSemanticNode.md)[]; \} |
1919
| `ctx.getAllComponents` | (`node`: `TSESTree.Program`) => [`ClassComponentSemanticNode`](../../../../interfaces/ClassComponentSemanticNode.md)[] |
20-
| <a id="visitor"></a> `visitor` | `ESLintUtils.RuleListener` |
20+
| <a id="property-visitor"></a> `visitor` | `ESLintUtils.RuleListener` |

packages/core/docs/@eslint-react/namespaces/useHookCollector/type-aliases/ReturnType.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ type ReturnType = {
1717

1818
| Property | Type |
1919
| ------ | ------ |
20-
| <a id="ctx"></a> `ctx` | \{ `getAllHooks`: [`HookSemanticNode`](../../../../interfaces/HookSemanticNode.md)[]; `getCurrentEntries`: `FunctionEntry`[]; `getCurrentEntry`: `FunctionEntry` \| `undefined`; \} |
20+
| <a id="property-ctx"></a> `ctx` | \{ `getAllHooks`: [`HookSemanticNode`](../../../../interfaces/HookSemanticNode.md)[]; `getCurrentEntries`: `FunctionEntry`[]; `getCurrentEntry`: `FunctionEntry` \| `undefined`; \} |
2121
| `ctx.getAllHooks` | [`HookSemanticNode`](../../../../interfaces/HookSemanticNode.md)[] |
2222
| `ctx.getCurrentEntries` | `FunctionEntry`[] |
2323
| `ctx.getCurrentEntry` | `FunctionEntry` \| `undefined` |
24-
| <a id="visitor"></a> `visitor` | `ESLintUtils.RuleListener` |
24+
| <a id="property-visitor"></a> `visitor` | `ESLintUtils.RuleListener` |

packages/core/docs/functions/findEnclosingComponentOrHook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Function: findEnclosingComponentOrHook()
44

55
```ts
6-
function findEnclosingComponentOrHook(node: Node | undefined, test: FindEnclosingComponentOrHookFilter):
6+
function findEnclosingComponentOrHook(node: Node | undefined, test?: FindEnclosingComponentOrHookFilter):
77
| ArrowFunctionExpression
88
| FunctionDeclarationWithName
99
| FunctionDeclarationWithOptionalName

packages/core/docs/functions/findParentJsxAttribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Function: findParentJsxAttribute()
44

55
```ts
6-
function findParentJsxAttribute(node: Node, test: (node: JSXAttribute) => boolean): JSXAttribute | undefined;
6+
function findParentJsxAttribute(node: Node, test?: (node: JSXAttribute) => boolean): JSXAttribute | undefined;
77
```
88

99
Traverses up the AST to find a parent JSX attribute node that matches a given test

packages/core/docs/functions/isFunctionWithLooseComponentName.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
function isFunctionWithLooseComponentName(
77
context: RuleContext,
88
fn: TSESTreeFunction,
9-
allowNone: boolean): boolean;
9+
allowNone?: boolean): boolean;
1010
```
1111

1212
Check if a function has a loose component name

packages/core/docs/functions/isInitializedFromReact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
function isInitializedFromReact(
77
name: string,
88
initialScope: Scope,
9-
importSource: string): boolean;
9+
importSource?: string): boolean;
1010
```
1111

1212
Check if a variable is initialized from React import

packages/core/docs/functions/isInitializedFromReactNative.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
function isInitializedFromReactNative(
77
name: string,
88
initialScope: Scope,
9-
importSource: string): boolean;
9+
importSource?: string): boolean;
1010
```
1111

1212
if a variable is initialized from React Native import

packages/core/docs/functions/isJsxLike.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function isJsxLike(
88
getScope: (node: Node) => Scope;
99
},
1010
node: Node | null | undefined,
11-
hint: bigint): boolean;
11+
hint?: bigint): boolean;
1212
```
1313

1414
Determine if a node represents JSX-like content based on heuristics

0 commit comments

Comments
 (0)