y_lints 0.0.8
y_lints: ^0.0.8 copied to clipboard
Custom lint rules that enforce clean architecture boundaries (domain, data, presentation) in Dart and Flutter projects.
y_lints example #
Full-layered project demonstrating every annotation and expected folder
layout y_lints checks for.
dart pub get
dart run custom_lint
Layout #
lib/
├── domain/
│ ├── entities/user_entity.dart # @DomainEntity
│ └── repositories/user_repository.dart # @Repository
├── data/
│ ├── models/user_model.dart # @Model
│ ├── repositories/user_repository_impl.dart # @RepositoryImpl
│ └── datasources/user/
│ ├── i_user_data_source.dart # @DataSource
│ └── implementations/
│ ├── remote_user_data_source.dart # @RemoteDataSource
│ └── mock_user_data_source.dart # @MockDataSource
└── presentation/user/
├── cubits/user_cubit/
│ ├── user_cubit.dart # @FeatureCubit
│ └── user_state.dart # @FeatureState
├── view/
│ └── user_builder.dart # @FeatureBuilder
└── pages/
└── user_page.dart # @Page
Move any file out of its expected folder — or drop its annotation — to see the relevant rule fire.