Learn how to selectively ignore Vibrant issues using inline comments and configuration files
Vibrant provides multiple ways to ignore issues when they are intentional or false positives. You can ignore individual lines, blocks of code, or entire files using inline comments or configuration.
module.exports = { ignore: [ 'node_modules', // Exact directory name 'dist/', // Directory with trailing slash '**/temp', // Any temp directory at any depth ],};
Always add a comment explaining why an issue is being ignored:
// vibrant ignore - false positive, this pattern is safe in this contextconst result = data as any;// vibrant ignore - TODO: refactor after v2 release (JIRA-123)function legacyHandler(req: any) { }
2
Use specific ignores over broad ones
Prefer ignoring specific lines over entire files:
// ✅ Good: Specific ignore// vibrant ignore-next-lineconst temp: any = JSON.parse(input);// ❌ Bad: Ignoring entire file// Put in config: 'src/utils.ts'
3
Review ignores regularly
Periodically audit ignored issues to ensure they’re still necessary:
# Search for ignore comments in your codebasegrep -r "vibrant ignore" src/# Review and remove unnecessary ignores
/** * Legacy API handler - being migrated to new type system * Tracked in: TECH-456 */// vibrant ignore-next-line - temporary during migrationexport function handleRequest(req: any, res: any) { // Old implementation // Will be replaced with properly typed version}