Skip to main content

Role - Config

Use role-config for TypeScript configuration files such as ESLint, Vitest, framework, and build-tool configs.

Why Use This Preset?

  1. Type-checks configuration code without creating runtime output.
  2. Prevents declaration files from being generated for files that are executed directly by their tools.
  3. Gives configuration files a visible role instead of repeating three compiler overrides in every project.

Usage

tsconfig.config.json
json
{
  "extends": [
    "@cbnventures/nova/presets/tsconfig/dx-essentials.json",
    "@cbnventures/nova/presets/tsconfig/dx-strict.json",
    "@cbnventures/nova/presets/tsconfig/role-config.json",
    "@cbnventures/nova/presets/tsconfig/runtime-node.json"
  ],
  "include": [
    "./eslint.config.mts",
    "./vitest.config.mts"
  ]
}

What This Preset Configures

SettingValueDescription
declarationfalseDoes not produce declarations for tool configuration.
declarationMapfalseDoes not produce declaration maps.
noEmittrueType-checks the files without writing build output.