feat(F-048): completed feature

This commit is contained in:
chattie
2026-08-19 07:17:14 +02:00
parent 8ee1938af9
commit 835ab66eda
187 changed files with 12361 additions and 1065 deletions

View File

@@ -72,7 +72,12 @@ function checkFile(file, rootAbs, violations) {
// R1: stay inside own module or go to shared
const ownModule = relTarget.startsWith(path.join('modules', sourceInModule) + path.sep);
const toShared = targetParts[0] === 'shared';
if (!ownModule && !toShared) {
const toOtherModulePublicIndex =
targetInModule !== null &&
targetInModule !== sourceInModule &&
targetParts.length === 3 &&
targetParts[2] === 'index';
if (!ownModule && !toShared && !toOtherModulePublicIndex) {
violations.push(
`R1 violation: ${relFile} imports "${specifier}" (escapes module "${sourceInModule}")`,
);