This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
[New rule] prefer-internal-library-imports #948
Open
Description
If there is an internal library and a developer reaches into it, show a linter warning that they should import the library itself.
- Warns about a potential error (problem)
- Suggests an alternate way of doing something (suggestion)
- Other (please specify:)
Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):
main.dart
import 'my_file.dart'; // LINT
import 'my_library.dart'; // NO LINT
void main() {
print(foo);
}
my_file.dart
const foo = 'foo';
my_library.dart
library my_library;
export 'my_file.dart';
Are you willing to submit a pull request to implement this rule?
Not at this time