circle-exclamation
Deeplint is still in the MVP development phase and not yet available for use.

All Options

This document provides a comprehensive reference for configuring DeepLint, including all available configuration options, their default values, and usage examples.

Configuration File

DeepLint can be configured using a configuration file. By default, DeepLint looks for the following files in the current directory:

  • deeplint.config.js (JavaScript)

  • .deeplintrc.js (JavaScript)

  • .deeplintrc.json (JSON)

  • .deeplintrc.yml (YAML)

  • .deeplintrc.yaml (YAML)

You can also specify a custom configuration file using the --config option:

deeplint --config=custom.config.js

Configuration Format

JavaScript Format

// deeplint.config.js
module.exports = {
  contextBuilder: {
    contextType: "light",
    maxTokens: 8000,
    tokensPerFile: 1000,
    maxFileSize: 500,
    includeDependencies: false,
    includeStructure: true,
  },
  files: {
    include: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"],
    exclude: ["node_modules/**", "dist/**", "build/**"],
    useGitignore: true,
  },
  git: {
    includeUnstaged: false,
  },
  logging: {
    level: "info",
  },
  llm: {
    provider: "openai",
    apiKey: "sk-...", // Optional, can use OPENAI_API_KEY env var
    model: "gpt-4o", // Optional, can use OPENAI_MODEL env var
    maxTokens: 16384,
    temperature: 0, // Optional, controls randomness (0-1)
    instructions: "Focus on security issues and performance optimizations", // Optional
  },
};

YAML Format

Configuration Options

Context Builder Options

The contextBuilder section configures how DeepLint builds context for analysis.

Option
Type
Default
Description

contextType

string

"light"

Context depth ("light" or "deep")

maxTokens

number

8000

Maximum tokens for the entire context

tokensPerFile

number

1000

Maximum tokens per file

maxFileSize

number

500

Maximum file size in KB

includeDependencies

boolean

false

Whether to include dependencies in the context

includeStructure

boolean

true

Whether to include code structure in the context

includeComments

boolean

true

Whether to include comments in the context

Example

Git Options

The git section configures how DeepLint interacts with Git.

Option
Type
Default
Description

includeUnstaged

boolean

false

Whether to include unstaged changes

hooks.preCommit

boolean

false

Whether to enable the pre-commit hook

Example

LLM Options

The llm section configures how DeepLint performs LLM-powered analysis.

Option
Type
Default
Description

provider

string

"openai"

LLM provider (currently only "openai")

apiKey

string

(none)

API key for the provider

model

string

"gpt-4o"

LLM model to use

maxTokens

number

16384

Maximum tokens for analysis

temperature

number

0

Temperature for the LLM (0-1), controls randomness

instructions

string

(none)

Additional instructions for the LLM

Example

See the Configuration Guide for full details, including LLM options, precedence, and environment variables.

Rules Options

The rules section configures how DeepLint applies rules and policies.

Option
Type
Default
Description

severity

string

"warning"

Default severity level ("error", "warning", "info")

policies

string[]

[]

Natural language policies to enforce

Example

Output Options

The output section configures how DeepLint formats and displays output.

Option
Type
Default
Description

format

string

"text"

Output format ("text", "json")

colorize

boolean

true

Whether to colorize the output

verbose

boolean

false

Whether to enable verbose output

Example

Environment Variables

DeepLint also supports configuration through environment variables. Environment variables take precedence over configuration file values.

Variable
Description
Example

OPENAI_API_KEY

OpenAI API key

OPENAI_API_KEY=sk-...

OPENAI_MODEL

Default model for OpenAI

OPENAI_MODEL=gpt-4o

LOG_LEVEL

Set the logging level

LOG_LEVEL=debug

DEBUG

Enable debug mode

DEBUG=true

Configuration Methods

DeepLint uses a cascading configuration system, where values are resolved in the following order (highest precedence first):

  1. Command-line options

  2. Environment variables

  3. Configuration file

  4. Default values

LLM options follow this same precedence. See the Configuration Guide for more.

TypeScript Configuration

If you're using TypeScript, you can use the defineConfig helper to get type checking for your configuration:

Configuration Examples

Minimal Configuration

Development Configuration

Production Configuration

Custom Rules Configuration

Extending Configurations

You can extend existing configurations using the extends property:

Configuration Validation

DeepLint validates your configuration when it starts. If there are any errors, DeepLint will display an error message and exit.

Common validation errors include:

  • Invalid option values

  • Unknown options

  • Type mismatches

  • Missing required options

Last updated