@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
27 lines • 1.21 kB
TypeScript
/** biome-ignore-all assist/source/organizeImports: off */
import { ESLintUtils } from '@typescript-eslint/utils';
import type { PerformanceBudget } from './utils/types.js';
type MessageIds = 'reassignSignal';
type Severity = {
[key in MessageIds]?: 'error' | 'warn' | 'off';
};
type Option = {
suffix?: string;
severity?: Severity;
performance?: PerformanceBudget;
/** Additional module sources exporting signal creators */
modules?: Array<string>;
/** If true, treat bare names `signal`/`computed`/`effect` as creators without import scoping */
allowBareNames?: boolean;
/** Custom creator base names, e.g. project-specific wrappers */
creatorNames?: Array<string>;
/**
* If true, enable suffix-based heuristics (e.g. variables ending with suffix like `Signal`).
* The heuristic will only be active if at least one known creator import/namespace is present in the file.
*/
enableSuffixHeuristic?: boolean;
};
type Options = [Option?];
export declare const forbidSignalReAssignmentRule: ESLintUtils.RuleModule<"reassignSignal", Options, unknown, ESLintUtils.RuleListener>;
export {};
//# sourceMappingURL=forbid-signal-re-assignment.d.ts.map