@ospm/eslint-plugin-react-signals-hooks
Version:
ESLint plugin for React Signals hooks - enforces best practices, performance optimizations, and integration patterns for @preact/signals-react usage in React projects
22 lines • 1.06 kB
TypeScript
/** biome-ignore-all assist/source/organizeImports: off */
import { ESLintUtils } from "@typescript-eslint/utils";
import type { PerformanceBudget } from "./utils/types.js";
type MessageIds = "missingUseSignalsInComponent" | "missingUseSignalsInCustomHook" | "wrongUseSignalsArg";
type Severity = {
[key in MessageIds]?: "error" | "warn" | "off";
};
type Option = {
ignoreComponents?: Array<string>;
performance?: PerformanceBudget;
severity?: Severity;
/** Configurable suffix to recognize as signals (default: 'Signal') */
suffix?: string;
/** When true, also fix concise arrow function components/hooks by wrapping body in a block with useSignals try/finally. */
wrapConciseArrows?: boolean;
/** Additional module specifiers that may export `signal`/`computed`. */
extraCreatorModules?: Array<string>;
};
type Options = [Option?];
export declare const requireUseSignalsRule: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
export {};
//# sourceMappingURL=require-use-signals.d.ts.map