Skip to content

Commit c10c967

Browse files
authored
Add new lints for flutter 3.16.2 and metrics 5.7.6 (#19)
1 parent b6354a4 commit c10c967

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.16.0
2+
* Lints from dart_metrics version 5.7.6
3+
* Lints for Flutter 3.16.2 and Dart 3.2.2
4+
* :warning: This version is based on discontinued DCM version
5+
16
## 1.13.2
27
* Lints from dart_metrics version 5.7.6
38
* Lints for Flutter 3.13.0 and Dart 3.0.6

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ And we just looooove lots of lints. :blue_heart:
2424
For a start please make sure you work with latest version of Flutter & Dart.
2525
```yaml
2626
environment:
27-
sdk: ">=3.0.6 <4.0.0"
28-
flutter: ^3.13.2
27+
sdk: ">=3.2.2 <4.0.0"
28+
flutter: ^3.16.2
2929
```
3030
3131
Then add a dev dependency in your `pubspec.yaml`:
@@ -40,7 +40,7 @@ or directly in pubspec.yaml
4040

4141
```yaml
4242
dev_dependencies:
43-
lint_quido: 1.13.2
43+
lint_quido: 1.16.0
4444
```
4545

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

124124
---

example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: lint_quido_example
2-
version: 1.0.0
2+
version: 1.16.0
33
publish_to: none
44

55
environment:
6-
sdk: ">=3.0.6 <4.0.0"
7-
flutter: ">=3.13.1"
6+
sdk: ">=3.2.2 <4.0.0"
7+
flutter: ">=3.16.2"
88

99
dependencies:
1010
lint_quido:

lib/miquido_lints.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ linter:
3030
# - always_specify_types - Incompatible with avoid_types_on_closure_parameters, which we prefer
3131
- always_use_package_imports
3232
- annotate_overrides
33+
- annotate_redeclares
3334
# - avoid_annotating_with_dynamic - Super problematic to fix with avoid_types_on_closure_parameters enabled
3435
- avoid_bool_literals_in_conditional_expressions
3536
# - 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
@@ -104,15 +105,13 @@ linter:
104105
- implicit_call_tearoffs
105106
- implicit_reopen
106107
- invalid_case_patterns
107-
- iterable_contains_unrelated_type
108108
- join_return_with_assignment
109109
- leading_newlines_in_multiline_strings
110110
- library_annotations
111111
- library_names
112112
- library_prefixes
113113
# - library_private_types_in_public_api - Disabled as any stateful widget triggers it
114114
# - lines_longer_than_80_chars - In Miquido there are two teams: 100 or 120. One of them is wrong.
115-
- list_remove_unrelated_type
116115
- literal_only_boolean_expressions
117116
- matching_super_parameters
118117
- missing_whitespace_between_adjacent_strings
@@ -150,7 +149,7 @@ linter:
150149
- prefer_constructors_over_static_methods
151150
- prefer_contains
152151
# - prefer_double_quotes - We prefer_single_quotes
153-
# - prefer_expression_function_bodies - We like mix of return and =>
152+
# - prefer_expression_function_bodies - We like mix of return and => and that is ok
154153
- prefer_final_fields
155154
- prefer_final_in_for_each
156155
- prefer_final_locals
@@ -201,7 +200,7 @@ linter:
201200
- unnecessary_breaks
202201
- unnecessary_const
203202
- unnecessary_constructor_name
204-
# - unnecessary_final - absurd justification for this one
203+
# - unnecessary_final - we prefer_final_locals
205204
- unnecessary_getters_setters
206205
- unnecessary_lambdas
207206
- unnecessary_late

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: lint_quido
2-
version: 1.13.2
2+
version: 1.16.0
33
description: Collection of Flutter lints that we use and follow in Miquido
44
repository: https://github.com/miquido/lint_quido
55
issue_tracker: https://github.com/miquido/lint_quido/issues
@@ -11,8 +11,8 @@ topics:
1111
- lints
1212

1313
environment:
14-
sdk: ">=3.0.6 <4.0.0"
15-
flutter: ">=3.13.0"
14+
sdk: ">=3.2.2 <4.0.0"
15+
flutter: ">=3.16.2"
1616

1717
platforms:
1818
android:

0 commit comments

Comments
 (0)