Skip to content

Commit

Permalink
Add new rules and bump dart sdk to 3.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quoc-huynh-cosee committed Feb 14, 2025
1 parent 0c88302 commit 1f71989
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 17 deletions.
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dart 3.7.0
flutter 3.29.0-stable
29 changes: 20 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
## 0.8.0

* Bump Dart to 3.7.
* Add new [core](./lib/core.yaml) rules
* [`strict_top_level_inference`](https://dart.dev/tools/linter-rules/strict_top_level_inference)
* [`unnecessary_underscores`](https://dart.dev/tools/linter-rules/unnecessary_underscores)
* Remove deprecated rules
* [`avoid_null_checks_in_equality_operators`](https://dart.dev/tools/linter-rules/avoid_null_checks_in_equality_operators)
* [`package_api_docs`](https://dart.dev/tools/linter-rules/package_api_docs)
* [`unsafe_html`](https://dart.dev/tools/linter-rules/unsafe_html)

## 0.7.0

* Add new [core](./lib/core.yaml) rules
* [`annotate_redeclares`](https://dart.dev/tools/linter-rules/annotate_redeclares).
* [`document_ignores`](https://dart.dev/tools/linter-rules/annotate_redeclares).
* [`invalid_runtime_check_with_js_interop_types`](https://dart.dev/tools/linter-rules/invalid_runtime_check_with_js_interop_types).
* [`use_truncating_division`](https://dart.dev/tools/linter-rules/use_truncating_division).
* [`unintended_html_in_doc_comment`](https://dart.dev/tools/linter-rules/unintended_html_in_doc_comment).
* [`annotate_redeclares`](https://dart.dev/tools/linter-rules/annotate_redeclares)
* [`document_ignores`](https://dart.dev/tools/linter-rules/annotate_redeclares)
* [`invalid_runtime_check_with_js_interop_types`](https://dart.dev/tools/linter-rules/invalid_runtime_check_with_js_interop_types)
* [`use_truncating_division`](https://dart.dev/tools/linter-rules/use_truncating_division)
* [`unintended_html_in_doc_comment`](https://dart.dev/tools/linter-rules/unintended_html_in_doc_comment)
* Add new [package](./lib/package.yaml) rules
* [`missing_code_block_language_in_doc_comment`](https://dart.dev/tools/linter-rules/missing_code_block_language_in_doc_comment).
* [`unnecessary_library_name`](https://dart.dev/tools/linter-rules/unnecessary_library_name).
* [`missing_code_block_language_in_doc_comment`](https://dart.dev/tools/linter-rules/missing_code_block_language_in_doc_comment)
* [`unnecessary_library_name`](https://dart.dev/tools/linter-rules/unnecessary_library_name)
* Removed unnecessary metrics
* [`prefer-commenting-analyzer-ignores`](https://dcl.apps.bancolombia.com/docs/rules/dart/prefer-commenting-analyzer-ignores).
* [`prefer-commenting-analyzer-ignores`](https://dcl.apps.bancolombia.com/docs/rules/dart/prefer-commenting-analyzer-ignores)

## 0.6.0

* Replace [dart_code_metrics](https://pub.dev/packages/dart_code_metrics) with [dart_code_linter](https://pub.dev/packages/dart_code_linter).
* Replace [dart_code_metrics](https://pub.dev/packages/dart_code_metrics) with [dart_code_linter](https://pub.dev/packages/dart_code_linter)

## 0.5.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To install the package, add the following to your `pubspec.yaml` file:

```yaml
dev_dependencies:
cosee_lints: ^0.7.0
cosee_lints: ^0.8.0
```
Then, add an include in `analysis_options.yaml`.<br>
Expand Down
9 changes: 9 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ void main() {

// ignore: avoid_print, We can disabling a rule for a single line by using `ignore`
print(n);
var longArgument = 10;
var anotherLongArgument = 10;
longFunction(
longArgument,
anotherLongArgument,
anotherLongArgument,
);
}

void longFunction(a, b, c) {}
4 changes: 2 additions & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.7.0"
version: "0.8.0"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -318,4 +318,4 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.6.0 <4.0.0"
dart: ">=3.7.0 <4.0.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: none
version: 1.0.0+1

environment:
sdk: ^3.6.0
sdk: ^3.7.0

dev_dependencies:
cosee_lints:
Expand Down
4 changes: 2 additions & 2 deletions lib/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ linter:
- throw_in_finally
- unnecessary_statements
- unrelated_type_equality_checks
- unsafe_html
- use_build_context_synchronously
- use_key_in_widget_constructors
- valid_regexps
Expand All @@ -75,7 +74,6 @@ linter:
- avoid_init_to_null
- avoid_js_rounded_ints
- avoid_multiple_declarations_per_line
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_private_typedef_functions
- avoid_redundant_argument_values
Expand Down Expand Up @@ -168,6 +166,7 @@ linter:
- sort_child_properties_last
- sort_constructors_first
- sort_unnamed_constructors_first
- strict_top_level_inference
- tighten_type_of_initializing_formals
- type_annotate_public_apis
- type_init_formals
Expand Down Expand Up @@ -195,6 +194,7 @@ linter:
- unnecessary_string_interpolations
- unnecessary_this
- unnecessary_to_list_in_spreads
- unnecessary_underscores
- use_colored_box
- use_enums
- use_full_hex_values_for_flutter_colors
Expand Down
1 change: 0 additions & 1 deletion lib/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ linter:
- library_annotations
- library_names
- missing_code_block_language_in_doc_comment
- package_api_docs
- package_prefixed_library_names
- public_member_api_docs
- slash_for_doc_comments
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Lint rules and metrics for Dart and Flutter used internally at cose
repository: https://github.com/cosee/cosee_lints
homepage: https://pub.dev/publishers/cosee.biz/packages
issue_tracker: https://github.com/cosee/cosee_lints/issues
version: 0.7.0
version: 0.8.0
topics:
- lints

Expand Down

0 comments on commit 1f71989

Please sign in to comment.