vibrant.config.js file configures how Vibrant analyzes your codebase. This file is optional - Vibrant works with zero configuration using sensible defaults.
Configuration file formats
Vibrant supports multiple configuration file formats:vibrant.config.js(CommonJS)vibrant.config.mjs(ES modules)vibrant.config.cjs(CommonJS explicit)vibrant.config.ts(TypeScript).vibrantrc.vibrantrc.js.vibrantrc.json
Basic example
vibrant.config.js
Configuration options
Files and ignores
Glob patterns for files to include in analysis.Default:Example:
Glob patterns for files and directories to exclude from analysis.Default:Example:
Alias for
ignore. Both properties work identically.Output formatting
Default output format for displaying analysis results.Values:
pretty- Colorful, detailed output with syntax highlighting (default)compact- Minimal output showing only essential informationplan- Markdown report saved tovibrant-report.mdjson- Machine-readable JSON format
AI provider
AI provider to use for enhanced analysis when running with
--ai flag.Values:openai- GPT-4o-miniclaude- Claude 3 Haikugemini- Gemini 1.5 Flashollama- Local modelsopenrouter- Multi-model API
OPENAI_API_KEY).Example:Rules
Configure individual rule severity levels and options.Each key is a rule ID, and the value can be:See rule configuration for details.
- A string:
'error','warn','info', or'off' - An array:
['error', ...options]for rules that accept configuration
Language options
Configure language parsing settings.Properties:
ecmaVersion(number) - ECMAScript version (default:2022)sourceType(string) -'module'or'script'(default:'module')globals(object) - Global variables available in code
Advanced options
Extend from shared configuration presets or other config files.Example:
Load custom plugins that provide additional rules.Example:
Shared settings available to all rules.Example:
Preset configurations
Vibrant includes built-in presets for different use cases:Strict preset
All rules as errors, best for production codebases:Relaxed preset
Most rules as warnings, good for prototyping:Minimal preset
Only critical bugs, minimal noise:AI preset
Optimized for AI-generated code:Complete example
vibrant.config.js
TypeScript example
vibrant.config.ts