conflicting advice for imports?
pq opened this issue · 2 comments
Hi!
Looking at advice for imports, it looks like we're suggesting conflicting rules:
effective_dart/lib/analysis_options.1.2.0.yaml
Lines 23 to 24 in 7a3e4a8
Or maybe the docs need to be updated?
Hi, those are not conflicting rules, actually. :-) I have also explored that. The naming is quite confising.
http://dart-lang.github.io/linter/lints/avoid_relative_lib_imports.html
This says "don't use ../lib/
in your relative imports".
http://dart-lang.github.io/linter/lints/prefer_relative_imports.html
This says "prefer relative imports over absolute ones".
Its both part of https://dart.dev/guides/language/effective-dart/usage#prefer-relative-paths-when-importing-libraries-within-your-own-packages-lib-directory
Looks like we could make the docs a little clearer. Thanks!