Skip to content

Commit

Permalink
Add new lints for flutter 3.16.2 and metrics 5.7.6 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkastel authored Dec 7, 2023
1 parent b6354a4 commit c10c967
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.16.0
* Lints from dart_metrics version 5.7.6
* Lints for Flutter 3.16.2 and Dart 3.2.2
* :warning: This version is based on discontinued DCM version

## 1.13.2
* Lints from dart_metrics version 5.7.6
* Lints for Flutter 3.13.0 and Dart 3.0.6
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ And we just looooove lots of lints. :blue_heart:
For a start please make sure you work with latest version of Flutter & Dart.
```yaml
environment:
sdk: ">=3.0.6 <4.0.0"
flutter: ^3.13.2
sdk: ">=3.2.2 <4.0.0"
flutter: ^3.16.2
```
Then add a dev dependency in your `pubspec.yaml`:
Expand All @@ -40,7 +40,7 @@ or directly in pubspec.yaml

```yaml
dev_dependencies:
lint_quido: 1.13.2
lint_quido: 1.16.0
```

At last in `analysis_options.yaml` add:
Expand Down Expand Up @@ -118,7 +118,7 @@ This is set of sources from which we are getting our linters and about good prac
- [Customizing static analysis in Dart](https://dart.dev/tools/analysis)
- [Effective Dart: Usage](https://dart.dev/guides/language/effective-dart/usage)
- [Flutter lints](https://github.com/flutter/packages/tree/main/packages/flutter_lints)
- [Dart metrics](https://dcm.dev/docs/individuals/rules/)
- [Dart Code Metrics](https://dcm.dev/docs/rules/)
- [Dart language type system](https://github.com/dart-lang/language/tree/main/resources/type-system)

---
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: lint_quido_example
version: 1.0.0
version: 1.16.0
publish_to: none

environment:
sdk: ">=3.0.6 <4.0.0"
flutter: ">=3.13.1"
sdk: ">=3.2.2 <4.0.0"
flutter: ">=3.16.2"

dependencies:
lint_quido:
Expand Down
7 changes: 3 additions & 4 deletions lib/miquido_lints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ linter:
# - always_specify_types - Incompatible with avoid_types_on_closure_parameters, which we prefer
- always_use_package_imports
- annotate_overrides
- annotate_redeclares
# - avoid_annotating_with_dynamic - Super problematic to fix with avoid_types_on_closure_parameters enabled
- avoid_bool_literals_in_conditional_expressions
# - avoid_catches_without_on_clauses - Flutter throws _CastError when parsing json fails, so we need to handle both Error and Exception in all API classes
Expand Down Expand Up @@ -104,15 +105,13 @@ linter:
- implicit_call_tearoffs
- implicit_reopen
- invalid_case_patterns
- iterable_contains_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_annotations
- library_names
- library_prefixes
# - library_private_types_in_public_api - Disabled as any stateful widget triggers it
# - lines_longer_than_80_chars - In Miquido there are two teams: 100 or 120. One of them is wrong.
- list_remove_unrelated_type
- literal_only_boolean_expressions
- matching_super_parameters
- missing_whitespace_between_adjacent_strings
Expand Down Expand Up @@ -150,7 +149,7 @@ linter:
- prefer_constructors_over_static_methods
- prefer_contains
# - prefer_double_quotes - We prefer_single_quotes
# - prefer_expression_function_bodies - We like mix of return and =>
# - prefer_expression_function_bodies - We like mix of return and => and that is ok
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
Expand Down Expand Up @@ -201,7 +200,7 @@ linter:
- unnecessary_breaks
- unnecessary_const
- unnecessary_constructor_name
# - unnecessary_final - absurd justification for this one
# - unnecessary_final - we prefer_final_locals
- unnecessary_getters_setters
- unnecessary_lambdas
- unnecessary_late
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: lint_quido
version: 1.13.2
version: 1.16.0
description: Collection of Flutter lints that we use and follow in Miquido
repository: https://github.com/miquido/lint_quido
issue_tracker: https://github.com/miquido/lint_quido/issues
Expand All @@ -11,8 +11,8 @@ topics:
- lints

environment:
sdk: ">=3.0.6 <4.0.0"
flutter: ">=3.13.0"
sdk: ">=3.2.2 <4.0.0"
flutter: ">=3.16.2"

platforms:
android:
Expand Down

0 comments on commit c10c967

Please sign in to comment.