(relativePath)
| 217 | while ((match = importRegex.exec(content)) !== null) { |
| 218 | const importedAlias = match[1]; |
| 219 | const violation = checkLayerViolation(layer, importedAlias); |
| 220 | if (violation) { |
| 221 | warnings.push(violation); |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | if (warnings.length > 0) { |
| 226 | hookOutput('post-edit', 'warned', |
| 227 | `[structural] ${relativePath}:\n` + warnings.map(w => ` - ${w}`).join('\n') + '\n', |
| 228 | { file: relativePath, warnings, lens: 'structural' }); |