@colveor/devkit
v1.6.0
Published
Shared development toolkit for the Colveor ecosystem.
Readme
@colveor/devkit
Shared development toolkit for every package in the Colveor ecosystem. Instead of copying TypeScript, ESLint, Prettier, Jest, and release configuration into each repository, extend or import settings from this package.
Purpose
@colveor/devkit is the single source of truth for Colveor library development. It provides production-ready defaults optimized for:
- Node.js 20+
- TypeScript strict mode
- NestJS-style libraries (decorators, modules, DTOs)
- Conventional Commits and automated releases
Installation
Install the devkit and peer dependencies in your package:
npm install --save-dev @colveor/devkit typescript eslint prettier jest ts-jest @types/jest @types/nodeInitialize Git hooks in your repository:
npx husky initThen wire Husky to the shared configs:
echo "npx lint-staged --no-stash --config node_modules/@colveor/devkit/lint-staged.config.js" > .husky/pre-commit
echo 'npx --no -- commitlint --config node_modules/@colveor/devkit/commitlint.config.js --edit "$1"' > .husky/commit-msgTypeScript
Create a root tsconfig.json that extends the shared base config:
{
"extends": "@colveor/devkit/tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src/**/*"]
}For builds, extend the build preset:
{
"extends": "@colveor/devkit/tsconfig.build.json"
}For tests and Jest, extend the test preset:
{
"extends": "@colveor/devkit/tsconfig.test.json"
}Included defaults
- ES2022 target for Node.js 20+
- Strict type checking
- Decorator support for NestJS
- Declaration files and source maps
- Incremental compilation
ESLint
Create eslint.config.js in your package root:
const baseConfig = require('@colveor/devkit/eslint.config.js');
/** @type {import('eslint').Linter.Config[]} */
module.exports = [
...baseConfig,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname,
},
},
},
];The shared ESLint flat config includes:
- TypeScript type-aware linting
- Prettier compatibility (no conflicting formatting rules)
- Import sorting
- Consistent type-only imports
- Unused import removal
- Floating and misused promise detection
- Warnings for explicit
any - Relaxed rules in test files
Generated artifacts (dist/, coverage/, *.d.ts) are ignored automatically.
Prettier
Extend the shared Prettier config in prettier.config.js:
module.exports = {
...require('@colveor/devkit/prettier.config.js'),
};Or reference it directly if your tooling supports config inheritance via package.json:
{
"prettier": "@colveor/devkit/prettier.config.js"
}Jest
Extend the shared Jest config in jest.config.js:
/** @type {import('jest').Config} */
module.exports = {
...require('@colveor/devkit/jest.config.js'),
// package-specific overrides
};Defaults include:
ts-jestwithtsconfig.test.json- Node test environment
- Coverage collection from
src/ - Sensible exclusions for NestJS boilerplate (modules, DTOs, entities)
Run tests:
npx jest
npx jest --coverageSemantic Release
Extend the shared release config in release.config.js:
/** @type {import('semantic-release').GlobalConfig} */
module.exports = {
...require('@colveor/devkit/release.config.js'),
};The shared config supports:
- Conventional Commits
- CHANGELOG generation
- npm publishing
- GitHub Releases
- Git commits for version bumps
CI secrets
Configure these GitHub Actions secrets in your repository:
| Secret | Purpose |
| -------------- | ------------------------------------------------------------------ |
| NPM_TOKEN | npm automation or granular token with publish access to your scope |
| GITHUB_TOKEN | Provided automatically by GitHub Actions |
When using actions/setup-node with registry-url, also pass NODE_AUTH_TOKEN in the release step (same value as NPM_TOKEN):
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-releaseSee .github/workflows/release.yml in this repository for a complete reference workflow.
CI
Copy .github/workflows/ci.yml from this package as a starting point, or mirror its steps in your own workflow.
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Validate
run: npm run validateSee .github/workflows/ci.yml in this repository for the full template.
Commitlint
Use the shared Commitlint config:
module.exports = require('@colveor/devkit/commitlint.config.js');Commit messages must follow Conventional Commits:
feat(storage): add S3 adapter
fix(api): handle null tenant id
chore: update devkitlint-staged
Use the shared lint-staged config in your package.json:
{
"lint-staged": {
"*.{js,ts}": ["prettier --write", "eslint --fix"],
"*.{json,md,yml,yaml}": ["prettier --write"]
}
}Or extend directly:
module.exports = require('@colveor/devkit/lint-staged.config.js');EditorConfig and Git
Copy or align with the shared .editorconfig and .gitattributes from this package for consistent formatting across editors and platforms.
Recommended .gitignore entries for Colveor libraries are included in this repository's .gitignore.
VS Code
Recommended workspace settings and extensions are in .vscode/settings.json and .vscode/extensions.json. Copy them into consuming packages or reference them as a starting point.
Best practices
- Extend, don't copy — Import configs from
@colveor/devkitso ecosystem-wide improvements roll out with a version bump. - Keep overrides minimal — Only add package-specific rules or paths when necessary.
- Use Conventional Commits — Required for semantic versioning and automated changelogs.
- Pin devkit versions — Use semver ranges that match your team's release cadence.
- Run hooks locally — Husky + lint-staged catch issues before CI.
- Use the test tsconfig for Jest — Keeps test-only types out of production builds.
Package contents
| Export | Description |
| ----------------------- | --------------------------------- |
| tsconfig.base.json | Base TypeScript compiler options |
| tsconfig.build.json | Production build preset |
| tsconfig.test.json | Jest and test file preset |
| eslint.config.js | ESLint v9 flat config |
| prettier.config.js | Prettier formatting defaults |
| jest.config.js | Jest + ts-jest defaults |
| release.config.js | Semantic Release pipeline |
| commitlint.config.js | Conventional Commits rules |
| lint-staged.config.js | Pre-commit formatting and linting |
What's included
This package ships ready-to-use configuration for:
- TypeScript — base, build, and test tsconfigs
- ESLint v9 — flat config with NestJS-friendly rules
- Prettier — consistent formatting defaults
- Jest — ts-jest setup with coverage defaults
- Semantic Release — Conventional Commits, changelog, npm, and GitHub releases
- Commitlint — commit message enforcement
- Husky + lint-staged — local pre-commit and commit-msg hooks
- EditorConfig / Git — editor and line-ending consistency
- GitHub — CI, release workflow, and issue/PR templates
- VS Code — recommended settings and extensions
License
MIT © 2026 Skyapp Labs
See LICENSE for the full license text.
