From ead770872e272e25a64315c120950ea8ad5b2509 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 8 Feb 2024 18:31:06 -0800 Subject: [PATCH] add library_annotations; remove package_prefixed_library_names (#179) --- CHANGELOG.md | 4 +++- lib/core.yaml | 2 +- rules.md | 4 ++-- tool/rules.json | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b76fbc..bdd9ea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ ## 4.0.0-wip - `core`: - - added `no_wildcard_variable_uses` + - added `library_annotations` (https://github.com/dart-lang/lints/issues/177) + - added `no_wildcard_variable_uses` (https://github.com/dart-lang/lints/issues/139) + - removed `package_prefixed_library_names` (https://github.com/dart-lang/lints/issues/172) - Updated the SDK lower-bound to 3.1. - Add a section on upgrading to the latest lint set to the readme. diff --git a/lib/core.yaml b/lib/core.yaml index 990d753..1cfe995 100644 --- a/lib/core.yaml +++ b/lib/core.yaml @@ -21,11 +21,11 @@ linter: - file_names - hash_and_equals - implicit_call_tearoffs + - library_annotations - no_duplicate_case_values - no_wildcard_variable_uses - non_constant_identifier_names - null_check_on_nullable_type_parameter - - package_prefixed_library_names - prefer_generic_function_type_aliases - prefer_is_empty - prefer_is_not_empty diff --git a/rules.md b/rules.md index 04e3921..2a4a5b9 100644 --- a/rules.md +++ b/rules.md @@ -5,7 +5,7 @@ | Lint Rules | Description | [Fix][] | | :--------- | :---------- | ------- | -| [`avoid_empty_else`](https://dart.dev/lints/avoid_empty_else) | Avoid empty else statements. | ✅ | +| [`avoid_empty_else`](https://dart.dev/lints/avoid_empty_else) | Avoid empty statements in else clauses. | ✅ | | [`avoid_relative_lib_imports`](https://dart.dev/lints/avoid_relative_lib_imports) | Avoid relative imports for files in `lib/`. | ✅ | | [`avoid_shadowing_type_parameters`](https://dart.dev/lints/avoid_shadowing_type_parameters) | Avoid shadowing type parameters. | | | [`avoid_types_as_parameter_names`](https://dart.dev/lints/avoid_types_as_parameter_names) | Avoid types as parameter names. | ✅ | @@ -20,11 +20,11 @@ | [`file_names`](https://dart.dev/lints/file_names) | Name source files using `lowercase_with_underscores`. | | | [`hash_and_equals`](https://dart.dev/lints/hash_and_equals) | Always override `hashCode` if overriding `==`. | ✅ | | [`implicit_call_tearoffs`](https://dart.dev/lints/implicit_call_tearoffs) | Explicitly tear-off `call` methods when using an object as a Function. | ✅ | +| [`library_annotations`](https://dart.dev/lints/library_annotations) | Attach library annotations to library directives. | ✅ | | [`no_duplicate_case_values`](https://dart.dev/lints/no_duplicate_case_values) | Don't use more than one case with same value. | ✅ | | [`no_wildcard_variable_uses`](https://dart.dev/lints/no_wildcard_variable_uses) | Don't use wildcard parameters or variables. | | | [`non_constant_identifier_names`](https://dart.dev/lints/non_constant_identifier_names) | Name non-constant identifiers using lowerCamelCase. | ✅ | | [`null_check_on_nullable_type_parameter`](https://dart.dev/lints/null_check_on_nullable_type_parameter) | Don't use null check on a potentially nullable type parameter. | ✅ | -| [`package_prefixed_library_names`](https://dart.dev/lints/package_prefixed_library_names) | Prefix library names with the package name and a dot-separated path. | | | [`prefer_generic_function_type_aliases`](https://dart.dev/lints/prefer_generic_function_type_aliases) | Prefer generic function type aliases. | ✅ | | [`prefer_is_empty`](https://dart.dev/lints/prefer_is_empty) | Use `isEmpty` for Iterables and Maps. | ✅ | | [`prefer_is_not_empty`](https://dart.dev/lints/prefer_is_not_empty) | Use `isNotEmpty` for Iterables and Maps. | ✅ | diff --git a/tool/rules.json b/tool/rules.json index fc501a2..a055005 100644 --- a/tool/rules.json +++ b/tool/rules.json @@ -11,7 +11,7 @@ }, { "name": "avoid_empty_else", - "description": "Avoid empty else statements.", + "description": "Avoid empty statements in else clauses.", "fixStatus": "hasFix" }, {