63 lines
2.0 KiB
JavaScript
63 lines
2.0 KiB
JavaScript
/** @type {import('dependency-cruiser').IConfiguration} */
|
|
module.exports = {
|
|
forbidden: [
|
|
{
|
|
name: "no-circular",
|
|
severity: "error",
|
|
from: {},
|
|
to: { circular: true },
|
|
},
|
|
{
|
|
name: "no-orphans",
|
|
severity: "error",
|
|
from: { orphan: true, pathNot: ["\\.d\\.ts$"] },
|
|
to: {},
|
|
},
|
|
{
|
|
name: "not-to-unresolvable",
|
|
severity: "error",
|
|
from: {},
|
|
to: { couldNotResolve: true, pathNot: ["^bun:"] },
|
|
},
|
|
{
|
|
name: "quota-is-standalone",
|
|
comment: "Quota ships independently of Agents and Multi-work.",
|
|
severity: "error",
|
|
from: { path: "^src/quota/" },
|
|
to: { path: "^src/(agents|multi-work)/" },
|
|
},
|
|
{
|
|
name: "agents-is-standalone",
|
|
comment: "Agents must load without Quota or Multi-work.",
|
|
severity: "error",
|
|
from: { path: "^src/agents/" },
|
|
to: { path: "^src/(quota|multi-work)/" },
|
|
},
|
|
{
|
|
name: "multi-work-not-to-quota",
|
|
comment: "Multi-work may build on Agents but not on Quota.",
|
|
severity: "error",
|
|
from: { path: "^src/multi-work/" },
|
|
to: { path: "^src/quota/" },
|
|
},
|
|
{
|
|
name: "src-not-to-scripts-or-tests",
|
|
severity: "error",
|
|
from: { path: "^src/" },
|
|
to: { path: "^(scripts|tests)/" },
|
|
},
|
|
],
|
|
options: {
|
|
doNotFollow: { path: "node_modules" },
|
|
tsConfig: { fileName: "tsconfig.json" },
|
|
tsPreCompilationDeps: true,
|
|
// TypeScript 7 has no compiler API yet; swc parses TS/TSX for the cruise.
|
|
parser: "swc",
|
|
enhancedResolveOptions: {
|
|
exportsFields: ["exports"],
|
|
conditionNames: ["import", "types", "bun", "default"],
|
|
extensions: [".ts", ".tsx", ".js", ".d.ts"],
|
|
},
|
|
},
|
|
};
|