Configuration Schema
The Rev-dep configuration file uses a structured JSON schema that defines how your codebase should be analyzed and governed.Supported File Names
Rev-dep looks for configuration files in this order:.rev-dep.config.jsonc(recommended - supports comments).rev-dep.config.jsonrev-dep.config.jsoncrev-dep.config.json
Root Properties
Configuration version string. Current version:
"1.6"Ensures compatibility between your config file and the CLI version.JSON schema URL for editor validation and autocompletion.Enables IntelliSense in VS Code and other editors.
Array of rule objects. Each rule targets a specific directory and defines checks for that scope.See Rules for detailed documentation.
Array of condition names for package.json exports resolution.Controls which conditional exports are resolved when analyzing imports. Common conditions:
"import"- ES modules"require"- CommonJS"node"- Node.js environment"default"- Fallback condition- Custom conditions specific to your build tools
Additional asset extensions treated as resolvable imports.Default list already covers common extensions for fonts, images, and config files. Use this to add project-specific asset types.
Extensions should not include the leading dot (use
"mp3" not ".mp3").Global file patterns to ignore across all rules.Git-ignored files are skipped by default. Use this for additional exclusions.
Quick Start Example
Monorepo Configuration
Monorepo Root Configuration Example
Monorepo Root Configuration Example
For monorepo projects, you typically have a root rule and rules for each package:Running
rev-dep config init at the workspace root automatically discovers packages and generates this structure.Supported Config Versions
The CLI supports the following config versions:"1.0","1.1","1.2","1.3","1.4","1.5","1.6"
Validation
The config file is strictly validated on load:- Unknown fields are rejected with clear error messages
- Type mismatches are caught (e.g., string where array expected)
- Required fields must be present
- Pattern validation ensures glob patterns don’t start with
./or../
Next Steps
Rules Configuration
Learn how to structure rules for different parts of your codebase
Available Checks
Explore all check types and their configuration options
