diff --git a/lib/metrics.yaml b/lib/metrics.yaml index 04d8a20..eac77b3 100644 --- a/lib/metrics.yaml +++ b/lib/metrics.yaml @@ -52,6 +52,17 @@ dart_code_metrics: - test/** - integration_test/** - prefer-trailing-comma + - avoid-banned-imports: + entries: + - paths: ['lib\/domain(\/\w+)+\.dart'] + deny: ['^package:\w*\/ui(\/\w+)+\.dart$'] + message: 'Do not import UI classes within domain layer.' + - paths: ['lib\/infrastructure(\/\w+)+\.dart'] + deny: ['^package:\w*\/ui(\/\w+)+\.dart$'] + message: 'Do not import UI classes within infrastructure layer.' + - paths: ['lib\/domain(\/\w+)+\.dart'] + deny: ['^package:\w*\/infrastructure(\/\w+)+\.dart$'] + message: 'Do not import infrastructure layer classes within domain layer.' # Flutter - always-remove-listener