empty-catch-block
Severity: ErrorCategory: Best Practices Disallows empty catch blocks that silently swallow errors.
Why this matters
Empty catch blocks make debugging nearly impossible because exceptions are caught but never handled. Errors disappear silently, hiding critical issues in your application.What it detects
- Completely empty catch blocks
- Catch blocks that only contain
console.log()
Examples
Bad: Empty catch blocks
Bad: Empty catch blocks
Good: Proper error handling
Good: Proper error handling
Location
apps/cli/src/rules/empty-catch-block.ts:1
empty-function-body
Severity: ErrorCategory: Best Practices Detects functions with no implementation.
Why this matters
Empty functions returnundefined unexpectedly and are often incomplete stubs left by AI code generation. They should be implemented or removed.
What it detects
- Functions with completely empty bodies
- Functions with only an empty
returnstatement - Excludes abstract methods
Examples
Bad: Empty function bodies
Bad: Empty function bodies
Good: Implemented functions
Good: Implemented functions
Location
apps/cli/src/rules/empty-function-body.ts:1
unimplemented-error
Severity: ErrorCategory: Best Practices Detects placeholder error throws indicating incomplete functionality.
Why this matters
Code that throws “not implemented” errors will crash at runtime. These are often AI-generated stubs that were never completed.Patterns detected
not implementedtodocoming soonimplement thisplaceholder
Examples
Bad: Placeholder errors
Bad: Placeholder errors
Good: Complete implementations
Good: Complete implementations
Location
apps/cli/src/rules/unimplemented-error.ts:1
no-unreachable
Severity: ErrorCategory: Possible Bugs Detects code that can never execute after return, throw, break, or continue statements.
Why this matters
Unreachable code is dead code that will never run, indicating a logic error or unnecessary code.Examples
Bad: Unreachable code
Bad: Unreachable code
Good: All code is reachable
Good: All code is reachable
Location
apps/cli/src/rules/no-unreachable.ts:1
no-ex-assign
Severity: ErrorCategory: Possible Bugs Detects reassignment of the error variable in catch clauses.
Why this matters
Reassigning the error variable in a catch block can lose the original error reference, making debugging difficult.Examples
Bad: Reassigning error variable
Bad: Reassigning error variable
Good: Create new error variable
Good: Create new error variable
Location
apps/cli/src/rules/no-ex-assign.ts:1
use-isnan
Severity: ErrorCategory: Possible Bugs Detects unsafe comparisons with
NaN using === or !==.
Why this matters
In JavaScript,NaN === NaN returns false, so direct comparison never works as expected. Use Number.isNaN() instead.
Examples
Bad: Direct NaN comparison
Bad: Direct NaN comparison
Good: Use Number.isNaN()
Good: Use Number.isNaN()
Location
apps/cli/src/rules/use-isnan.ts:1
Summary
These bug detection rules help catch common errors before they cause runtime issues:- Handle errors properly instead of swallowing them
- Implement all functions or remove unused ones
- Complete placeholder code before production
- Remove unreachable dead code
- Use
Number.isNaN()for NaN checks