eagle_eye 2.0.5
eagle_eye: ^2.0.5 copied to clipboard
EagleEye is a Dart CLI tool provided by CodandoTV for detecting architecture violations in Dart projects.
EagleEye #
EagleEye is a Dart CLI tool for detecting architecture violations in Dart projects.
📚 Check our documentation here.
Minimum Requirements #
Dart Package #
- Dart 3.8+
Features #
- Analyze Dart project files for architectural rules.
- Detect forbidden dependencies based on configurable patterns.
- Lightweight CLI, easy to integrate into your project workflow.
How to install? #
dev_dependencies:
...
eagle_eye: ^version
Getting Started #
Quick setup #
- Enable the lint rule in
analysis_options.yaml:
analyzer:
errors:
avoid_relative_lib_imports: error
- Create
eagle_eye_config.jsonat your project root:
[
{
"filePattern": "*/model/*",
"dependenciesAllowed": false,
"name": "models-no-imports"
},
{
"filePattern": "*viewmodel.dart",
"forbiddenDependencies": ["*_screen.dart"],
"name": "viewmodels-no-screens"
}
]
- Add the dependency to
pubspec.yaml:
dev_dependencies:
eagle_eye: ^2.0.4
- Run it:
dart run eagle_eye:main
Auto-generate config with a prompt #
You can use this prompt with an AI assistant to automatically detect your architecture and generate an eagle_eye_config.json with the right rules.
For the full setup guide with architecture-specific templates and customization guidelines, see the Getting Started documentation.