T001–T006: Phase 1 setup (workspace, Biome, TS, Vitest, layer boundary enforcement)

This commit is contained in:
Lukas
2026-03-03 12:54:29 +01:00
parent ddb2b317d3
commit 7dd4abb12a
27 changed files with 2655 additions and 35 deletions

View File

@@ -0,0 +1,8 @@
{
"name": "@initiative/domain",
"version": "0.0.0",
"private": true,
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts"
}

View File

@@ -0,0 +1,16 @@
import { describe, expect, it } from "vitest";
import { checkLayerBoundaries } from "../../../../scripts/check-layer-boundaries.mjs";
describe("layer boundaries", () => {
it("domain and application packages have no forbidden imports", () => {
const violations = checkLayerBoundaries();
if (violations.length > 0) {
const messages = violations.map(
(v) =>
`${v.file}:${v.line} imports "${v.importPath}" (forbidden: ${v.forbidden})`,
);
throw new Error(`Layer boundary violations:\n ${messages.join("\n ")}`);
}
expect(violations).toHaveLength(0);
});
});

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "dist"
},
"include": ["src"],
"exclude": ["src/__tests__"]
}