requireTsxForHooks`{{name}}` is a React hook declared in a `.ts` file. Rename the file to `.tsx`: tooling that treats `.tsx` as the marker for React code, such as React lint rules scoped to `.tsx` and the React Compiler, skips it otherwise.small-rules/require-tsx-for-hooksRequire React hooks to be declared in a .tsx file.
Many projects use the .tsx extension to mark React code. Their React lint rules run on .tsx files only,
and the React Compiler often reads the same marker. A hook in a .ts file loses both without a warning.
This rule reports a hook declared in a .ts file. A hook is a function whose name is use and then a
capital letter or a digit, as the React Compiler defines it. Declaration files, declare signatures,
re-exports, and aliases of an imported hook pass.
requireTsxForHooks`{{name}}` is a React hook declared in a `.ts` file. Rename the file to `.tsx`: tooling that treats `.tsx` as the marker for React code, such as React lint rules scoped to `.tsx` and the React Compiler, skips it otherwise.This rule does not accept options.
export function useThing() { return 1; }export function useThing() { return 1; }