@sablier/devkit
v1.15.3
Published
Configuration files and reusable scripts for Sablier repositories
Readme
🛠️ Sablier Devkit
Configuration files and reusable scripts for Sablier repositories. Designed to be extended and customized as needed.
📦 Installation
npm install @sablier/devkitOr with other package managers:
pnpm add @sablier/devkit
bun add @sablier/devkit🚀 Usage
Biome
Extend the base Biome configuration in your biome.jsonc:
{
"$schema": "https://biomejs.dev/schemas/latest/schema.json",
"extends": ["@sablier/devkit/biome"],
}For UI projects, use the UI variant:
{
"extends": ["@sablier/devkit/biome/ui"],
}Prettier
Reference the Prettier config in your package.json:
{
"prettier": "@sablier/devkit/prettier"
}TypeScript
Extend TSConfig presets in your tsconfig.json:
{
"extends": "@sablier/devkit/tsconfig/base"
}Available presets:
@sablier/devkit/tsconfig/base— Base TypeScript configuration@sablier/devkit/tsconfig/build— Build-optimized configuration@sablier/devkit/tsconfig/next— Next.js configuration
Vitest
Use the devkit vitest config factory in your vitest.config.ts:
import { defineDevkitConfig } from "@sablier/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: ["basic"]in CI,["verbose"]locally
For merging with existing Vite configs:
import { defineDevkitConfig, mergeConfig } from "@sablier/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 "@sablier/devkit/just/base.just"
import "@sablier/devkit/just/npm.just"Available modules:
| Module | Description |
| --------------- | ------------------------------- |
| base.just | Common development recipes |
| csv.just | CSV/TSV validation with qsv |
| evm.just | EVM/Foundry tooling |
| 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: sablier-labs/devkit/actions/setup@main🖥️ Setup Script
For Sablier Labs employees and staff, see shell/setup.sh.
🤝 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.
