@prb/devkit
v1.2.0
Published
Personal configuration files and reusable scripts
Maintainers
Readme
🛠️ Devkit
Personal configuration files and reusable scripts. Designed to be extended and customized as needed.
📦 Installation
npm install @prb/devkitOr with other package managers:
pnpm add @prb/devkit
bun add @prb/devkit🚀 Usage
Biome
The Biome configs require @biomejs/biome 2.6.2 or later. Extend the base Biome configuration in your biome.jsonc:
{
"$schema": "https://biomejs.dev/schemas/latest/schema.json",
"extends": ["@prb/devkit/biome"],
}For UI projects, extend both the base and UI configurations:
{
"extends": ["@prb/devkit/biome", "@prb/devkit/biome/ui"],
}The presets also compose with Ultracite 8.1.0's biome/core, biome/react, and biome/next presets. List Ultracite
first and Devkit afterward so Devkit's overrides apply. The UI preset supports React Compiler callbacks and leaves
Tailwind class ordering to ESLint's project configuration.
Prettier
Reference the Prettier config in your package.json:
{
"prettier": "@prb/devkit/prettier"
}TypeScript
Extend TSConfig presets in your tsconfig.json:
{
"extends": "@prb/devkit/tsconfig/base"
}Available presets:
@prb/devkit/tsconfig/base— Base TypeScript configuration@prb/devkit/tsconfig/build— Build-optimized configuration@prb/devkit/tsconfig/next— Next.js configuration
Vitest
The factory supports Vitest 4 and 5. Use the Node.js and Vite versions required by your chosen Vitest release.
Use the devkit vitest config factory in your vitest.config.ts:
import { defineDevkitConfig } from "@prb/devkit/vitest";
export default defineDevkitConfig({
environment: "jsdom", // or "node" (default), "happy-dom"
setupFiles: ["./tests/setup.ts"],
coverage: true,
});The config provides CI-aware defaults:
globals: trueretry: 2in CI,0locallytestTimeout: 30sin CI,10slocallyreporters: ["default"]in CI,["verbose"]locally
Absent optional settings preserve Vitest's defaults. coverage: true selects the V8 provider; install the matching
@vitest/coverage-v8 version and run Vitest with --coverage to collect coverage.
For merging with existing Vite configs:
import { defineDevkitConfig, mergeConfig } from "@prb/devkit/vitest";
import { defineConfig } from "vitest/config";
export default mergeConfig(
defineDevkitConfig({ environment: "jsdom" }),
defineConfig({
test: {
alias: { "@": "./src" },
},
}),
);Just
Import Just recipes in your justfile:
import "@prb/devkit/just/base.just"
import "@prb/devkit/just/npm.just"Available modules:
| Module | Description |
| --------------- | ------------------------------- |
| base.just | Common development recipes |
| csv.just | CSV/TSV validation with qsv |
| evm.just | Solidity and Foundry recipes |
| npm.just | NPM package management |
| settings.just | Just settings and configuration |
| vercel.just | Vercel build and deploy |
⚙️ Available Configs
| Tool | Config File/Directory |
| ----------- | ---------------------------------------- |
| 🔍 Biome | biome/ |
| 🛠 Just | just/ |
| ✨ Prettier | .prettierrc.json |
| 📦 TSConfig | tsconfig/ |
| 🧪 Vitest | vitest/ |
| 💻 VSCode | vscode/ |
🐈⬛ GitHub Actions
Reusable composite actions for GitHub CI workflows.
| Action | Description |
| --------------------------------------------- | ------------------------------------------ |
| actions/setup | Install dependencies (Node.js, Just, etc.) |
| actions/node-cache | Cache Node.js dependencies |
- uses: PaulRBerg/devkit/actions/setup@v1Dependency caching stores only the package-manager cache, not node_modules. Set save-cache: true in at most one
parallel job to publish a refreshed cache.
🍴 Fork
This repository is a fork of sablier-labs/devkit, reset to v1.0.0 under
the @prb/devkit name. For the change history prior to this fork, see the
upstream CHANGELOG.md.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under MIT — see the LICENSE file for details.
