UNPKG

@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

25 lines 1.25 kB
import { ESLintUtils } from '@typescript-eslint/utils'; import type { PerformanceBudget } from './utils/types.mjs'; type MessageIds = 'variableWithSignalSuffixNotSignal' | 'parameterWithSignalSuffixNotSignal' | 'propertyWithSignalSuffixNotSignal' | 'suggestRenameWithoutSuffix' | 'suggestConvertToSignal'; type Severity = { [key in MessageIds]?: 'error' | 'warn' | 'off'; }; type Option = { ignorePattern?: string; /** Custom signal function names to recognize (e.g., ['createSignal', 'customSignal']) */ signalNames?: Array<string>; /** Suffix to detect (configurable); default 'Signal' */ suffix?: string; /** Whether to validate object properties that end with the suffix */ validateProperties?: boolean; /** Whether to validate exported variables (by default exported names are skipped) */ validateExported?: boolean; /** Severity levels for different violation types */ severity?: Severity; /** Performance tuning option */ performance?: PerformanceBudget; }; type Options = [Option?]; export declare const noNonSignalWithSignalSuffixRule: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>; export {}; //# sourceMappingURL=no-non-signal-with-signal-suffix.d.ts.map