very_good_analysis icon indicating copy to clipboard operation
very_good_analysis copied to clipboard

feat: Add `prefer_barrel_import`

Open metaspook opened this issue 7 months ago • 0 comments

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';

metaspook avatar May 19 '25 09:05 metaspook