Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Add lints for v2.0 #72

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
## 2.0.0

- Added the following lints to core.yaml:
- `depend_on_referenced_packages`
- `null_check_on_nullable_type_parameter`
- Added the following lints to recommended.yaml:
- `library_private_types_in_public_api`
- `no_leading_underscores_for_library_prefixes`
- `no_leading_underscores_for_local_identifiers`
- `prefer_interpolation_to_compose_strings`
- `unnecessary_constructor_name`
- `unnecessary_late`
- `unnecessary_null_aware_assignments`
- `unnecessary_nullable_for_final_variable_declarations`
- Bumped the minimum required Dart SDK version to 2.17

## 1.0.1

- Documentation updates

## 1.0.0

- Initial stable version

## 1.0.0-dev.0

- Initial version
2 changes: 2 additions & 0 deletions lib/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ linter:
- camel_case_extensions
- camel_case_types
- curly_braces_in_flow_control_structures
- depend_on_referenced_packages
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto fix for this one is still under discussion, see https://github.com/dart-lang/lints/issues/42.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are going to ship this without an autofix.

- empty_catches
- file_names
- hash_and_equals
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- no_duplicate_case_values
- non_constant_identifier_names
- null_check_on_nullable_type_parameter
- package_prefixed_library_names
- prefer_generic_function_type_aliases
- prefer_is_empty
Expand Down
8 changes: 8 additions & 0 deletions lib/recommended.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ linter:
- implementation_imports
- library_names
- library_prefixes
- library_private_types_in_public_api
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
- null_closures
- overridden_fields
- package_names
Expand All @@ -33,6 +36,7 @@ linter:
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_inlined_adds
- prefer_interpolation_to_compose_strings
- prefer_is_not_operator
- prefer_null_aware_operators
- prefer_spread_collections
Expand All @@ -42,9 +46,13 @@ linter:
- type_init_formals
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_constructor_name
- unnecessary_getters_setters
- unnecessary_late
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_in_if_null_operators
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: lints
description: Official Dart lint rules. Defines the 'core' and 'recommended' set of lints suggested by the Dart team.
homepage: https://github.com/dart-lang/lints
repository: https://github.com/dart-lang/lints
version: 1.0.1
version: 2.0.0

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.17.0-206.0.dev <3.0.0'

# dependencies:
# dev_dependencies:
Expand Down