Skip to content

Commit

Permalink
refactor: remove unused functions and documentation related to displa…
Browse files Browse the repository at this point in the history
…y name assignment and React hooks
  • Loading branch information
Rel1cx committed Feb 26, 2025
1 parent 0c169a5 commit 1c3c6d0
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 84 deletions.
2 changes: 0 additions & 2 deletions packages/core/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
- [isCreateRef](functions/isCreateRef.md)
- [isCreateRefCall](functions/isCreateRefCall.md)
- [isDeclaredInRenderPropLoose](functions/isDeclaredInRenderPropLoose.md)
- [isDisplayNameAssignment](functions/isDisplayNameAssignment.md)
- [isForwardRef](functions/isForwardRef.md)
- [isForwardRefCall](functions/isForwardRefCall.md)
- [isFromReact](functions/isFromReact.md)
Expand All @@ -94,7 +93,6 @@
- [isGetDerivedStateFromError](functions/isGetDerivedStateFromError.md)
- [isGetDerivedStateFromProps](functions/isGetDerivedStateFromProps.md)
- [isInitializedFromReact](functions/isInitializedFromReact.md)
- [isInsideReactHook](functions/isInsideReactHook.md)
- [isInsideRenderMethod](functions/isInsideRenderMethod.md)
- [isInversePhase](functions/isInversePhase.md)
- [isMemo](functions/isMemo.md)
Expand Down
25 changes: 0 additions & 25 deletions packages/core/docs/functions/isDisplayNameAssignment.md

This file was deleted.

19 changes: 0 additions & 19 deletions packages/core/docs/functions/isInsideReactHook.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/src/component/component-collector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import type { TSESTree } from "@typescript-eslint/types";
import { AST_NODE_TYPES as T } from "@typescript-eslint/types";
import type { ESLintUtils } from "@typescript-eslint/utils";

import { DISPLAY_NAME_ASSIGNMENT_SELECTOR } from "../constants";
import { isReactHookCall } from "../hook";
import { DISPLAY_NAME_ASSIGNMENT_SELECTOR } from "../utils";
import type { ERComponentHint } from "./component-collector-hint";
import { DEFAULT_COMPONENT_HINT } from "./component-collector-hint";
import { ERComponentFlag } from "./component-flag";
Expand Down
10 changes: 10 additions & 0 deletions packages/core/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* The ESQuery selector for a component display name assignment expression
*/
export const DISPLAY_NAME_ASSIGNMENT_SELECTOR = [
"AssignmentExpression",
"[type]",
"[operator='=']",
"[left.type='MemberExpression']",
"[left.property.name='displayName']",
].join("");
8 changes: 0 additions & 8 deletions packages/core/src/hook/hierarchy.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/src/hook/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./hierarchy";
export * from "./hook-collector";
export type * from "./hook-kind";
export * from "./hook-name";
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from "./component";
export * from "./constants";
export * from "./effect";
export * from "./hook";
export type * from "./semantic-entry";
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./is-display-name-assignment";
export * from "./is-from-react";
export * from "./is-initialized-from-react";
export * from "./is-react-api";
27 changes: 0 additions & 27 deletions packages/core/src/utils/is-display-name-assignment.ts

This file was deleted.

0 comments on commit 1c3c6d0

Please sign in to comment.