BetaViberTest is in active development — expect breaking changes.
Overview
vibertest init
Generate a default configuration file in your project root. This creates a .vibertestrc.json with all rules, thresholds, and ignore patterns pre-configured.
Usage#
Terminalbash
$ vibertest initWhat It Creates#
Running vibertest init creates the following file in your project root:
.vibertestrc.jsonjson
{
"rules": {
"oversized-files": { "enabled": true },
"god-file": { "enabled": true },
"bloated-barrel": { "enabled": true },
"circular-deps": { "enabled": true },
"separation-of-concerns": { "enabled": true },
"dead-code": { "enabled": true },
"code-duplication": { "enabled": true },
"poor-maintainability": { "enabled": true },
"missing-error-handling": { "enabled": true },
"missing-tests": { "enabled": false },
"style-inconsistency": { "enabled": true },
"pattern-inconsistency": { "enabled": true },
"obsolete-patterns": { "enabled": true },
"unused-deps": { "enabled": true },
"duplicate-deps": { "enabled": true },
"hardcoded-secrets": { "enabled": true },
"ai-smell": { "enabled": true },
"abandoned-todo": { "enabled": true },
"security-antipatterns": { "enabled": true },
"missing-compliance": { "enabled": true },
"accessibility": { "enabled": true },
"missing-project-standards": { "enabled": true },
"missing-production-basics": { "enabled": true },
"react-performance": { "enabled": false }
},
"ignore": [
"node_modules", "dist", "build",
".next", "coverage", ".turbo", ".git"
],
"thresholds": {
"maxFileLines": 500,
"maxFunctionLines": 60,
"maxFunctionParams": 5,
"maxImports": 20,
"minTestRatio": 0.05
}
}When to Use#
ViberTest works with zero config out of the box. You only need to run init when you want to:
- Customize thresholds (e.g., allow larger files or more function params)
- Disable rules that don't apply to your project
- Add custom ignore patterns for generated or legacy code
- Enable
react-performance(disabled by default) - Commit the config to version control so your team shares the same settings
Supported Config Formats#
While init creates a JSON file, ViberTest also supports these formats (searched in order):
- 1
.vibertestrc.json - 2
.vibertestrc.yaml - 3
.vibertestrc.yml - 4
vibertest.config.js - 5
vibertest.config.ts
See the Configuration guide for detailed customization options.