Enable prefer_relative_imports (#6501)

This commit is contained in:
stuartmorgan
2022-09-28 10:25:24 -04:00
committed by GitHub
parent 9974a8ef44
commit 2e2c4c5837
10 changed files with 47 additions and 9 deletions

View File

@ -158,10 +158,12 @@ class MakeDepsPathBasedCommand extends PackageCommand {
...pubspec.dependencies.keys,
...pubspec.devDependencies.keys,
];
final Iterable<String> packagesToOverride = combinedDependencies
final List<String> packagesToOverride = combinedDependencies
.where(
(String packageName) => localDependencies.containsKey(packageName))
.toList();
// Sort the combined list to avoid sort_pub_dependencies lint violations.
packagesToOverride.sort();
if (packagesToOverride.isNotEmpty) {
final String commonBasePath = packagesDir.path;
// Find the relative path to the common base.