feat: enforce frontend quality guardrails

This commit is contained in:
2026-08-24 13:07:14 +03:00
parent 826936c6a4
commit 1fc269adec
18 changed files with 542 additions and 42 deletions
+21
View File
@@ -1,22 +1,43 @@
module.exports = {
forbidden: [
{
name: "no-circular",
severity: "error",
from: {},
to: { circular: true },
},
{
name: "slices-must-use-public-api",
severity: "error",
from: {
path: "^src/(app|pages|features|entities|shared)/([^/]+)/",
},
to: {
path: "^src/(app|pages|features|entities|shared)/([^/]+)/(?!index\\.ts$)",
pathNot: "^src/$1/$2/",
},
},
{
name: "shared-must-not-depend-on-layers",
severity: "error",
from: { path: "^src/shared/" },
to: { path: "^src/(entities|features|pages|app)/" },
},
{
name: "entities-must-not-depend-on-higher-layers",
severity: "error",
from: { path: "^src/entities/" },
to: { path: "^src/(features|pages|app)/" },
},
{
name: "features-must-not-depend-on-higher-layers",
severity: "error",
from: { path: "^src/features/" },
to: { path: "^src/(pages|app)/" },
},
{
name: "pages-must-not-depend-on-app",
severity: "error",
from: { path: "^src/pages/" },
to: { path: "^src/app/" },
},