validate configuration values

Always verify configuration values against official documentation and test across target platforms before committing. Invalid configuration values can cause build failures, runtime errors, or platform-specific issues that are difficult to debug.

copy reviewer prompt

Prompt

Reviewer Prompt

Always verify configuration values against official documentation and test across target platforms before committing. Invalid configuration values can cause build failures, runtime errors, or platform-specific issues that are difficult to debug.

Key validation practices:

  • Check configuration values against official documentation (e.g., TypeScript lib options, VS Code settings)
  • Test configurations on all target platforms, especially when using environment variables
  • Avoid assumptions about default keybindings or environment-specific values
  • Use platform-agnostic paths and values when possible

Example of problematic configuration:

// tsconfig.json - Invalid lib value
{
  "compilerOptions": {
    "lib": ["es2022", "esnext.disposable", "DOM"] //  "esnext.disposable" is not valid
  }
}

// Fixed version
{
  "compilerOptions": {
    "lib": ["es2022", "DOM"] //  Valid lib values only
  }
}

This prevents configuration-related build failures and ensures consistent behavior across development environments.

Source discussions