Skip to content

Commit 1c3c6d0

Browse files
committed
refactor: remove unused functions and documentation related to display name assignment and React hooks
1 parent 0c169a5 commit 1c3c6d0

File tree

10 files changed

+12
-84
lines changed

10 files changed

+12
-84
lines changed

packages/core/docs/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
- [isCreateRef](functions/isCreateRef.md)
8080
- [isCreateRefCall](functions/isCreateRefCall.md)
8181
- [isDeclaredInRenderPropLoose](functions/isDeclaredInRenderPropLoose.md)
82-
- [isDisplayNameAssignment](functions/isDisplayNameAssignment.md)
8382
- [isForwardRef](functions/isForwardRef.md)
8483
- [isForwardRefCall](functions/isForwardRefCall.md)
8584
- [isFromReact](functions/isFromReact.md)
@@ -94,7 +93,6 @@
9493
- [isGetDerivedStateFromError](functions/isGetDerivedStateFromError.md)
9594
- [isGetDerivedStateFromProps](functions/isGetDerivedStateFromProps.md)
9695
- [isInitializedFromReact](functions/isInitializedFromReact.md)
97-
- [isInsideReactHook](functions/isInsideReactHook.md)
9896
- [isInsideRenderMethod](functions/isInsideRenderMethod.md)
9997
- [isInversePhase](functions/isInversePhase.md)
10098
- [isMemo](functions/isMemo.md)

packages/core/docs/functions/isDisplayNameAssignment.md

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

packages/core/docs/functions/isInsideReactHook.md

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

packages/core/src/component/component-collector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import type { TSESTree } from "@typescript-eslint/types";
77
import { AST_NODE_TYPES as T } from "@typescript-eslint/types";
88
import type { ESLintUtils } from "@typescript-eslint/utils";
99

10+
import { DISPLAY_NAME_ASSIGNMENT_SELECTOR } from "../constants";
1011
import { isReactHookCall } from "../hook";
11-
import { DISPLAY_NAME_ASSIGNMENT_SELECTOR } from "../utils";
1212
import type { ERComponentHint } from "./component-collector-hint";
1313
import { DEFAULT_COMPONENT_HINT } from "./component-collector-hint";
1414
import { ERComponentFlag } from "./component-flag";

packages/core/src/constants.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* The ESQuery selector for a component display name assignment expression
3+
*/
4+
export const DISPLAY_NAME_ASSIGNMENT_SELECTOR = [
5+
"AssignmentExpression",
6+
"[type]",
7+
"[operator='=']",
8+
"[left.type='MemberExpression']",
9+
"[left.property.name='displayName']",
10+
].join("");

packages/core/src/hook/hierarchy.ts

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

packages/core/src/hook/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export * from "./hierarchy";
21
export * from "./hook-collector";
32
export type * from "./hook-kind";
43
export * from "./hook-name";

packages/core/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export * from "./component";
2+
export * from "./constants";
23
export * from "./effect";
34
export * from "./hook";
45
export type * from "./semantic-entry";

packages/core/src/utils/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export * from "./is-display-name-assignment";
21
export * from "./is-from-react";
32
export * from "./is-initialized-from-react";
43
export * from "./is-react-api";

packages/core/src/utils/is-display-name-assignment.ts

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

0 commit comments

Comments
 (0)