Fix typos. (#147)
The wonders of in-IDE spell checking.
Also ask for newest lints (no changes needed).
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a682bc3..2870c8c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -53,7 +53,7 @@
- Based on new JSON file format with more content.
- This version includes all the new functionality intended for a 2.0.0
version, as well as the, now deprecated, version 1 functionality.
- When we release 2.0.0, the deprectated functionality will be removed.
+ When we release 2.0.0, the deprecated functionality will be removed.
## 1.1.0
diff --git a/lib/src/discovery.dart b/lib/src/discovery.dart
index 352bed8..b678410 100644
--- a/lib/src/discovery.dart
+++ b/lib/src/discovery.dart
@@ -33,7 +33,7 @@
/// Returns `null` if no configuration was found. If a configuration
/// is needed, then the caller can supply [PackageConfig.empty].
///
-/// If [minVersion] is greated than 1, `.packages` files are ignored.
+/// If [minVersion] is greater than 1, `.packages` files are ignored.
/// If [minVersion] is greater than the version read from the
/// `package_config.json` file, it too is ignored.
Future<PackageConfig?> findPackageConfig(Directory baseDirectory,
@@ -46,7 +46,7 @@
do {
// Check for $cwd/.packages
var packageConfig =
- await findPackagConfigInDirectory(directory, minVersion, onError);
+ await findPackageConfigInDirectory(directory, minVersion, onError);
if (packageConfig != null) return packageConfig;
if (!recursive) break;
// Check in parent directories.
@@ -113,10 +113,10 @@
/// a best-effort attempt is made to return a package configuration.
/// This may be the empty package configuration.
///
-/// If [minVersion] is greated than 1, `.packages` files are ignored.
+/// If [minVersion] is greater than 1, `.packages` files are ignored.
/// If [minVersion] is greater than the version read from the
/// `package_config.json` file, it too is ignored.
-Future<PackageConfig?> findPackagConfigInDirectory(Directory directory,
+Future<PackageConfig?> findPackageConfigInDirectory(Directory directory,
int minVersion, void Function(Object error) onError) async {
var packageConfigFile = await checkForPackageConfigJsonFile(directory);
if (packageConfigFile != null) {
diff --git a/lib/src/package_config.dart b/lib/src/package_config.dart
index 048555f..155dfc5 100644
--- a/lib/src/package_config.dart
+++ b/lib/src/package_config.dart
@@ -34,7 +34,7 @@
///
/// The package's root ([Package.root]) and package-root
/// ([Package.packageUriRoot]) paths must satisfy a number of constraints
- /// We say that one path (which we know ends with a `/` charater)
+ /// We say that one path (which we know ends with a `/` character)
/// is inside another path, if the latter path is a prefix of the former path,
/// including the two paths being the same.
///
@@ -159,7 +159,7 @@
/// Look up a package by name.
///
- /// Returns the [Package] fron [packages] with [packageName] as
+ /// Returns the [Package] from [packages] with [packageName] as
/// [Package.name]. Returns `null` if the package is not available in the
/// current configuration.
Package? operator [](String packageName);
@@ -377,7 +377,7 @@
/// An *invalid* language version.
///
-/// Stored in a [Package] when the orginal language version string
+/// Stored in a [Package] when the original language version string
/// was invalid and a `onError` handler was passed to the parser
/// which did not throw on an error.
abstract class InvalidLanguageVersion implements LanguageVersion {
diff --git a/lib/src/package_config_impl.dart b/lib/src/package_config_impl.dart
index d8e8d49..865e99a 100644
--- a/lib/src/package_config_impl.dart
+++ b/lib/src/package_config_impl.dart
@@ -436,7 +436,7 @@
}
// For internal reasons we allow this (for now). One should still never do
- // it thouh.
+ // it though.
// 3) The new package is inside the packageUriRoot of existing package.
if (_disallowPackagesInsidePackageUriRoot) {
if (_beginsWith(0, existingPackage.packageUriRoot.toString(),
diff --git a/lib/src/packages_file.dart b/lib/src/packages_file.dart
index f84db10..bf68f2c 100644
--- a/lib/src/packages_file.dart
+++ b/lib/src/packages_file.dart
@@ -114,7 +114,7 @@
}
if (packageNames.contains(packageName)) {
onError(PackageConfigFormatException(
- 'Same package name occured more than once', source, start));
+ 'Same package name occurred more than once', source, start));
continue;
}
var rootUri = packageLocation;
diff --git a/lib/src/util.dart b/lib/src/util.dart
index 3bf1bec..f1fa207 100644
--- a/lib/src/util.dart
+++ b/lib/src/util.dart
@@ -164,7 +164,7 @@
/// the [baseUri], or if there is no overlap in the paths of the
/// two URIs at all, the [uri] is returned as-is.
///
-/// Otherwise the result is a path-only URI which satsifies
+/// Otherwise the result is a path-only URI which satisfies
/// `baseUri.resolveUri(result) == uri`,
///
/// The `baseUri` must be absolute.
diff --git a/pubspec.yaml b/pubspec.yaml
index 6ac7f54..9db82c6 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -10,5 +10,5 @@
path: ^1.8.0
dev_dependencies:
- dart_flutter_team_lints: ^2.0.0
+ dart_flutter_team_lints: ^2.1.0
test: ^1.16.0
diff --git a/test/package_config_impl_test.dart b/test/package_config_impl_test.dart
index 87d1fd4..0f39963 100644
--- a/test/package_config_impl_test.dart
+++ b/test/package_config_impl_test.dart
@@ -126,7 +126,7 @@
});
group('package config', () {
- test('emtpy', () {
+ test('empty', () {
var empty = PackageConfig([], extraData: unique);
expect(empty.version, 2);
expect(empty.packages, isEmpty);