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

16 lines 857 B
import type { TSESLint } from '@typescript-eslint/utils'; import type { SourceCode } from '@typescript-eslint/utils/ts-eslint'; /** * Ensure that a given named import exists for `moduleName`. * Returns a list of fixes to add/merge the named import in the most idiomatic way. * * Behavior: * - If an import from module exists with a namespace specifier, inserts a separate named import line. * - If it has named specifiers, appends to that list. * - If it only has a default specifier, converts to `default, { named }` form. * - If none exists, inserts a new import near the first import, respecting quote and semicolon style. */ export declare function ensureNamedImportFixes(context: { sourceCode: SourceCode; }, fixer: TSESLint.RuleFixer, moduleName: string, importName: string): Array<TSESLint.RuleFix>; //# sourceMappingURL=imports.d.ts.map