Overview
Use Nova Presets to lock in strict TypeScript, consistent style, and predictable builds. Pick the layers that match your stack.
Install
If the package is not in your repo yet, go to Setup and Configure and choose Install into project.
Nova must be installed in your project before importing presets. This is because Node.js resolves imports from your project's node_modules folder.
If you wish, you can install Nova globally (into the system) and locally (into the project) at the same time. They will not conflict with each other.
ESLint presets
Configure ESLint by composing small layers into a single flat config export. The goal is clear rules, low noise, and fast composition.
Mental Model
Nova's ESLint presets are flat config layers that you spread into one export. Think of them as small building blocks. Each layer states intent and adds a focused set of opinions without hiding magic.
Composition follows a simple order:
- Start with an ignores file to keep noise out.
- Apply strict code styling so formatting is consistent project-wide.
- Add a single language layer for the code you write (e.g., TypeScript).
- Then the environment (runtime) or framework that matches where it runs.
- Optionally, pick a platform.
- Finish with any tool specifics.
60-Second Setup
This example shows a minimal Node.js project using TypeScript, composed with Nova's ESLint presets. Configured through the eslint.config.ts or eslint.config.js file.
import {
dxCodeStyle,
dxIgnore,
envNode,
langTypescript,
} from '@cbnventures/nova/eslint';
export default [
...dxIgnore,
...dxCodeStyle,
...langTypescript,
...envNode,
];
Read next: ESLint Best Practices.
TSConfig presets
Configure TypeScript by chaining a few preset configs with "extends". Aim for consistent compiler behavior, strict typing, and predictable output with minimal overrides.
Mental Model
Nova's TSConfig presets are small layers you chain with "extends".
Composition follows a simple order:
- Start with essentials as the baseline.
- Apply strict for stronger compiler checks.
- Then add the environment (runtime) or framework that matches where it runs.
- Optionally, pick a platform.
- Finish with any tool specifics.
The presets set the heavy knobs for you (e.g., module with moduleResolution, matching lib sets, etc.), so your config stays simple.
Keep local overrides focused on project wiring: paths and baseUrl for imports, outDir and rootDir for layout, types for type packages, and use include for the files you compile and exclude for build artifacts and node_modules.
60-Second Setup
This example shows a minimal Node.js project using TypeScript, composed with Nova's TSConfig presets. Configured through the tsconfig.json file.
{
"extends": [
"@cbnventures/nova/tsconfig/dx-essentials.json",
"@cbnventures/nova/tsconfig/dx-strict.json",
"@cbnventures/nova/tsconfig/env-node.json"
],
"compilerOptions": {
"baseUrl": "./",
"outDir": "./build",
"paths": {
"@/*": [
"./src/*"
]
},
"rootDir": "./",
"types": [
"@types/node"
]
},
"include": [
"./*",
"./src/**/*"
],
"exclude": [
"./build/**",
"./node_modules/**"
]
}
Read next: TSConfig Best Practices.