component-hook-factories
Configuration
rslint.config.ts
Rule Details
Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
environment.hookPattern: A JavaScript regular expression pattern for custom Hook names. Function names that match this pattern are treated as Hooks when the rule classifies nested factories. When omitted or invalid, the rule falls back to React's default Hook naming convention.
Examples of incorrect code for this rule with { "environment": { "hookPattern": "^signal[A-Z]" } }: