Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/core/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
- [ComponentLifecyclePhaseKind](type-aliases/ComponentLifecyclePhaseKind.md)
- [ComponentPhaseKind](type-aliases/ComponentPhaseKind.md)
- [ComponentStateKind](type-aliases/ComponentStateKind.md)
- [EffectKind](type-aliases/EffectKind.md)
- [JsxAttributeValue](type-aliases/JsxAttributeValue.md)
- [JsxDetectionHint](type-aliases/JsxDetectionHint.md)

Expand Down
9 changes: 0 additions & 9 deletions packages/core/docs/type-aliases/EffectKind.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/docs/type-aliases/JsxDetectionHint.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
> **JsxDetectionHint** = `bigint`

BitFlags for configuring JSX detection behavior
Uses BigInt for bit operations to support many flags
4 changes: 0 additions & 4 deletions packages/core/docs/variables/JsxDetectionHint.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

> **JsxDetectionHint**: `object`

Flags to control JSX detection behavior:
- Skip* flags: Ignore specific node types when detecting JSX
- Strict* flags: Enforce stricter rules for container types

## Type Declaration

### None
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/effect/effect-kind.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/src/effect/index.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/core/src/hook/hook-semantic-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ export interface Hook extends SemanticNode {
node: AST.TSESTreeFunction;
// The name of the hook
name: string;
// The `HookFlag` of the hook, reserved for future use
// flag: bigint;
// The type of the hook, reserved for future use
// type: number;
// The number of hooks defined in the hook, reserved for future use
// size: number;
// The number of slots the hook takes, (1 + the number of other hooks it calls)
// cost: number;
// The other hooks called by the hook
hookCalls: TSESTree.CallExpression[];
}
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./component";
export type * from "./effect";
export * from "./hook";
export * from "./jsx";
export type * from "./semantic";
Expand Down
18 changes: 6 additions & 12 deletions packages/core/src/jsx/jsx-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,19 @@ import {
type RuleContext,
} from "@eslint-react/shared";

// Constants for JSX emit settings.
export const JsxEmit = {
None: 0, // Do not emit JSX code.
Preserve: 1, // Emit .jsx files with JSX preserved.
React: 2, // Emit .js files with React.createElement calls.
ReactNative: 3, // Emit .js files with React Native specific output.
ReactJSX: 4, // Emit .js files with the new JSX transform.
ReactJSXDev: 5, // Emit .js files with the new JSX transform for development.
None: 0,
Preserve: 1,
React: 2,
ReactNative: 3,
ReactJSX: 4,
ReactJSXDev: 5,
} as const;

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

Expand Down
6 changes: 0 additions & 6 deletions packages/core/src/jsx/jsx-detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,10 @@ import type { TSESTree } from "@typescript-eslint/utils";

/**
* BitFlags for configuring JSX detection behavior
* Uses BigInt for bit operations to support many flags
*/
export type JsxDetectionHint = bigint;

/* eslint-disable perfectionist/sort-objects */
/**
* Flags to control JSX detection behavior:
* - Skip* flags: Ignore specific node types when detecting JSX
* - Strict* flags: Enforce stricter rules for container types
*/
export const JsxDetectionHint = {
None: 0n,
SkipUndefined: 1n << 0n, // Ignore undefined values
Expand Down
Loading