Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

[New rule] prefer-internal-library-imports #948

Open
1 of 3 tasks
lukepighetti opened this issue Jul 28, 2022 · 0 comments
Open
1 of 3 tasks

[New rule] prefer-internal-library-imports #948

lukepighetti opened this issue Jul 28, 2022 · 0 comments
Assignees
Labels
area-rules good first issue Good for newcomers type: enhancement New feature or request

Comments

@lukepighetti
Copy link

lukepighetti commented Jul 28, 2022

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

@incendial incendial changed the title [New rule] use_internal_library_imports [New rule] prefer-internal-library-imports Jul 29, 2022
@incendial incendial added type: enhancement New feature or request good first issue Good for newcomers area-rules labels Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-rules good first issue Good for newcomers type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants