Skip to content

feat: Add prefer_barrel_import #146

Closed
@metaspook

Description

@metaspook

Description

This would be very helpful if there's a lint rule that tells to import barrel file instead of direct or individual file if there's any barrel available in the importing directory. my dev team juniors mostly make this mistake..
Thanks in advance 👍

Requirements

  • All CI/CD checks are passing.
  • There is no drop in the test coverage percentage.

Additional Context

  • If directory mobile_app/modules/dashboard/ contains a barrel file e.g. dashboard.dart
    // Good
    import 'package:mobile_app/modules/dashboard/dashboard.dart';
    // Bad
    import 'package:mobile_app/modules/dashboard/view/dashboard_view.dart';

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions