vibrant rules command displays all available rules that Vibrant uses to detect problematic code patterns.
Syntax
Description
This command lists all detection rules with their severity level and description. Rules are organized by category:- Type Safety - Detect unsafe type usage
- Incomplete Code - Find unfinished implementations
- Error Handling - Catch poor error handling patterns
- Security - Identify security vulnerabilities
- Performance - Spot performance issues
- Possible Bugs - Find logic errors
- Code Quality - Detect debugging artifacts
- AI Telltales - Identify AI-generated patterns
Example output
Rule severity icons
✖(red) - Error severity⚠(yellow) - Warning severity
Rule categories
Type safety
Detects explicit use of the
any type in TypeScript. Using any defeats type checking and can cause runtime crashes.Incomplete code
Finds code that throws “not implemented” errors. This code will crash when executed.
Detects functions with no implementation that return
undefined unexpectedly.Error handling
Finds catch blocks that silently ignore errors without any handling logic.
Security
Detects potential hardcoded API keys, passwords, and secrets in code.
Identifies potential SQL injection vulnerabilities from string concatenation in queries.
Finds usage of
innerHTML, dangerouslySetInnerHTML, and similar XSS vectors.Performance
Detects
await inside loops that could be parallelized with Promise.all().Possible bugs
Finds unreachable code after
return, throw, or other control flow statements.Detects incorrect
NaN comparisons. Use Number.isNaN() instead of === NaN.Code quality
Finds debug console statements that shouldn’t be in production code.
AI telltales
Detects emojis in comments, a common pattern in AI-generated code.
Identifies excessive TODO/FIXME comments often left by AI code generators.
Best practices
Finds unnamed numeric constants that should be extracted to named variables.
Using rule information
After viewing available rules, you can:- Configure rule severity in
vibrant.config.js - Disable specific rules by setting them to
"off" - Customize rule options for rules that accept configuration