Skip to content

Commit

Permalink
Add new lints for flutter 3.13.1 and metrics 5.7.6 (#14)
Browse files Browse the repository at this point in the history
* Update to version 1.13.1

* Change all rules
  • Loading branch information
paulkastel committed Aug 30, 2023
1 parent 106c16d commit 9a5f73e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.13.1
* Lints from dart_metrics version 5.7.6
* Lints for Flutter 3.13.1 and Dart 3.0.6
* :warning: This version is based on discontinued DCM version

## 1.10.0
* Lints from dart_metrics version 5.7.3
* Lints for Flutter 3.10.0 and Dart 3.0.0
Expand Down
18 changes: 9 additions & 9 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.0 <4.0.0"
flutter: ^3.10.0
sdk: ">=3.0.6 <4.0.0"
flutter: ^3.13.1
```
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.10.0
lint_quido: 1.13.1
```

At last in `analysis_options.yaml` add:
Expand Down Expand Up @@ -108,18 +108,18 @@ To overcome this use older version of package or try using
In your pubspec add:
```yaml
dependency_overrides:
test_api: 0.4.17
test_api: 0.4.18
```

## Additional information
This is set of sources from which we are getting our linters and about good practices in Dart/Flutter:
- [All Dart lints](https://dart-lang.github.io/linter/lints/)
- [All Dart lints, but this time linter source code](https://github.com/dart-lang/linter/blob/master/example/all.yaml)
- [Customizing static analysis in Dart](https://dart.dev/guides/language/analysis-options)
- [All Dart lints](https://dart.dev/tools/linter-rules/all)
- [All Dart lints, but this time linter source code](https://github.com/dart-lang/linter/blob/main/example/all.yaml)
- [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/master/packages/flutter_lints)
- [Flutter lints](https://github.com/flutter/packages/tree/main/packages/flutter_lints)
- [Dart metrics](https://dcm.dev/docs/individuals/rules/)
- [Dart language type system](https://github.com/dart-lang/language/tree/master/resources/type-system)
- [Dart language type system](https://github.com/dart-lang/language/tree/main/resources/type-system)

---
#### About Miquido
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ version: 1.0.0
publish_to: none

environment:
flutter: ">=3.7.7"
sdk: ">=2.19.2 <3.0.0"
sdk: ">=3.0.6 <4.0.0"
flutter: ">=3.13.1"

dependencies:
lint_quido:
Expand Down
5 changes: 5 additions & 0 deletions lib/miquido_lints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ linter:
- always_declare_return_types
- always_put_control_body_on_new_line
- always_put_required_named_parameters_first
- always_require_non_null_named_parameters
# - always_specify_types - Incompatible with avoid_types_on_closure_parameters, which we prefer
- always_use_package_imports
- annotate_overrides
Expand Down Expand Up @@ -54,6 +55,8 @@ linter:
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- avoid_returning_this
- avoid_setters_without_getters
Expand Down Expand Up @@ -121,6 +124,8 @@ linter:
- no_literal_bool_comparisons
- no_logic_in_create_state
- no_runtimeType_toString
- no_self_assignments
- no_wildcard_variable_uses
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
Expand Down
16 changes: 12 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
name: lint_quido
version: 1.10.0
version: 1.13.1
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
homepage: https://github.com/miquido/lint_quido
documentation: https://github.com/miquido/lint_quido

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.10.0"
sdk: ">=3.0.6 <4.0.0"
flutter: ">=3.13.1"

platforms:
linux:
windows:
macos:
ios:
android:
web:

dependencies:
dart_code_metrics: ^5.7.3
dart_code_metrics: 5.7.6

flutter:
sdk: flutter

0 comments on commit 9a5f73e

Please sign in to comment.