Skip to content

Commit 1c8a0b8

Browse files
authored
Remove unused code (#1318)
1 parent 928b5c9 commit 1c8a0b8

File tree

10 files changed

+6
-47
lines changed

10 files changed

+6
-47
lines changed

packages/core/docs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
- [ComponentLifecyclePhaseKind](type-aliases/ComponentLifecyclePhaseKind.md)
3232
- [ComponentPhaseKind](type-aliases/ComponentPhaseKind.md)
3333
- [ComponentStateKind](type-aliases/ComponentStateKind.md)
34-
- [EffectKind](type-aliases/EffectKind.md)
3534
- [JsxAttributeValue](type-aliases/JsxAttributeValue.md)
3635
- [JsxDetectionHint](type-aliases/JsxDetectionHint.md)
3736

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

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
> **JsxDetectionHint** = `bigint`
1010
1111
BitFlags for configuring JSX detection behavior
12-
Uses BigInt for bit operations to support many flags

packages/core/docs/variables/JsxDetectionHint.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88

99
> **JsxDetectionHint**: `object`
1010
11-
Flags to control JSX detection behavior:
12-
- Skip* flags: Ignore specific node types when detecting JSX
13-
- Strict* flags: Enforce stricter rules for container types
14-
1511
## Type Declaration
1612

1713
### None

packages/core/src/effect/effect-kind.ts

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

packages/core/src/effect/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/core/src/hook/hook-semantic-node.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ export interface Hook extends SemanticNode {
1212
node: AST.TSESTreeFunction;
1313
// The name of the hook
1414
name: string;
15-
// The `HookFlag` of the hook, reserved for future use
16-
// flag: bigint;
17-
// The type of the hook, reserved for future use
18-
// type: number;
19-
// The number of hooks defined in the hook, reserved for future use
20-
// size: number;
21-
// The number of slots the hook takes, (1 + the number of other hooks it calls)
22-
// cost: number;
2315
// The other hooks called by the hook
2416
hookCalls: TSESTree.CallExpression[];
2517
}

packages/core/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./component";
2-
export type * from "./effect";
32
export * from "./hook";
43
export * from "./jsx";
54
export type * from "./semantic";

packages/core/src/jsx/jsx-config.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,19 @@ import {
88
type RuleContext,
99
} from "@eslint-react/shared";
1010

11-
// Constants for JSX emit settings.
1211
export const JsxEmit = {
13-
None: 0, // Do not emit JSX code.
14-
Preserve: 1, // Emit .jsx files with JSX preserved.
15-
React: 2, // Emit .js files with React.createElement calls.
16-
ReactNative: 3, // Emit .js files with React Native specific output.
17-
ReactJSX: 4, // Emit .js files with the new JSX transform.
18-
ReactJSXDev: 5, // Emit .js files with the new JSX transform for development.
12+
None: 0,
13+
Preserve: 1,
14+
React: 2,
15+
ReactNative: 3,
16+
ReactJSX: 4,
17+
ReactJSXDev: 5,
1918
} as const;
2019

21-
// Interface for JSX configuration.
2220
export interface JsxConfig {
23-
// Specifies what JSX code is generated.
2421
jsx?: number;
25-
// Specifies the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
2622
jsxFactory?: string;
27-
// Specifies the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
2823
jsxFragmentFactory?: string;
29-
// Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.
3024
jsxImportSource?: string;
3125
}
3226

packages/core/src/jsx/jsx-detection.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,10 @@ import type { TSESTree } from "@typescript-eslint/utils";
2222

2323
/**
2424
* BitFlags for configuring JSX detection behavior
25-
* Uses BigInt for bit operations to support many flags
2625
*/
2726
export type JsxDetectionHint = bigint;
2827

2928
/* eslint-disable perfectionist/sort-objects */
30-
/**
31-
* Flags to control JSX detection behavior:
32-
* - Skip* flags: Ignore specific node types when detecting JSX
33-
* - Strict* flags: Enforce stricter rules for container types
34-
*/
3529
export const JsxDetectionHint = {
3630
None: 0n,
3731
SkipUndefined: 1n << 0n, // Ignore undefined values

0 commit comments

Comments
 (0)