@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
20 lines • 865 B
TypeScript
import { ESLintUtils } from '@typescript-eslint/utils';
import type { PerformanceBudget } from './utils/types.js';
type MessageIds = 'preferShowOverTernary' | 'suggestShowComponent' | 'addShowImport';
type Severity = {
[key in MessageIds]?: 'error' | 'warn' | 'off';
};
type Option = {
/** Minimum complexity score to trigger the rule */
minComplexity?: number;
/** Custom signal function names (e.g., ['createSignal', 'useSignal']) */
signalNames?: Array<string>;
/** Configurable suffix to recognize as signals (default: 'Signal') */
suffix?: string;
performance?: PerformanceBudget;
severity?: Severity;
};
type Options = [Option?];
export declare const preferShowOverTernaryRule: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
export {};
//# sourceMappingURL=prefer-show-over-ternary.d.ts.map