no-empty-function
Configuration
rslint.config.ts
Rule Details
Disallow empty functions. Empty functions can hide incomplete refactors; add a comment to intentionally empty function bodies, or configure an allowed function kind.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
TypeScript parameter-property constructors are also allowed:
Options
allow: An array of empty function kinds to permit. Default:[].
Allowed values:
functionsarrowFunctionsgeneratorFunctionsmethodsgeneratorMethodsgetterssettersconstructorsasyncFunctionsasyncMethodsprivateConstructorsprotectedConstructorsdecoratedFunctionsoverrideMethods
Examples of correct code for this rule with { "allow": ["constructors"] }:
Examples of correct code for this rule with { "allow": ["decoratedFunctions"] }: