Skip to content

Commit 9e3c831

Browse files
committed
add unnecessary_underscores to recommended
1 parent 0b2bd3f commit 9e3c831

File tree

5 files changed

+30
-2
lines changed

5 files changed

+30
-2
lines changed

pkgs/lints/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 6.0.0-wip
2+
3+
- `recommended`:
4+
- added [unnecessary_underscores] (https://github.com/dart-lang/core/issues/856)
5+
- Require Dart 3.7.
6+
17
## 5.1.1
28

39
- Updated the SDK lower bound to 3.6.

pkgs/lints/lib/recommended.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ linter:
6363
- unnecessary_string_interpolations
6464
- unnecessary_this
6565
- unnecessary_to_list_in_spreads
66+
- unnecessary_underscores
6667
- use_function_type_syntax_for_parameters
6768
- use_rethrow_when_possible
6869
- use_super_parameters

pkgs/lints/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: lints
2-
version: 5.1.1
2+
version: 6.0.0-wip
33
description: >
44
Official Dart lint rules. Defines the 'core' and 'recommended' set of lints
55
suggested by the Dart team.
@@ -11,7 +11,7 @@ topics:
1111
- lints
1212

1313
environment:
14-
sdk: ^3.6.0
14+
sdk: ^3.7.0
1515

1616
# NOTE: Code is not allowed in this package - do not add dependencies.
1717
# dependencies:

pkgs/lints/rules.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
| [`unnecessary_string_interpolations`](https://dart.dev/lints/unnecessary_string_interpolations) | Unnecessary string interpolation. ||
9999
| [`unnecessary_this`](https://dart.dev/lints/unnecessary_this) | Don't access members with `this` unless avoiding shadowing. ||
100100
| [`unnecessary_to_list_in_spreads`](https://dart.dev/lints/unnecessary_to_list_in_spreads) | Unnecessary `toList()` in spreads. ||
101+
| [`unnecessary_underscores`](https://dart.dev/lints/unnecessary_underscores) | Unnecessary underscores can be removed. ||
101102
| [`use_function_type_syntax_for_parameters`](https://dart.dev/lints/use_function_type_syntax_for_parameters) | Use generic function type syntax for parameters. ||
102103
| [`use_rethrow_when_possible`](https://dart.dev/lints/use_rethrow_when_possible) | Use rethrow to rethrow a caught exception. ||
103104
| [`use_super_parameters`](https://dart.dev/lints/use_super_parameters) | Use super-initializer parameters where possible. ||

pkgs/lints/tool/rules.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,11 @@
904904
"description": "Specify non-obvious type annotations for top-level and static variables.",
905905
"fixStatus": "hasFix"
906906
},
907+
{
908+
"name": "strict_top_level_inference",
909+
"description": "Specify type annotations.",
910+
"fixStatus": "hasFix"
911+
},
907912
{
908913
"name": "super_goes_last",
909914
"description": "Place the `super` call last in a constructor initialization list.",
@@ -949,6 +954,11 @@
949954
"description": "Use of angle brackets in a doc comment is treated as HTML by Markdown.",
950955
"fixStatus": "needsFix"
951956
},
957+
{
958+
"name": "unnecessary_async",
959+
"description": "No await no async.",
960+
"fixStatus": "needsFix"
961+
},
952962
{
953963
"name": "unnecessary_await_in_return",
954964
"description": "Unnecessary `await` keyword in return.",
@@ -984,6 +994,11 @@
984994
"description": "Avoid wrapping fields in getters and setters just to be \"safe\".",
985995
"fixStatus": "hasFix"
986996
},
997+
{
998+
"name": "unnecessary_ignore",
999+
"description": "Don't ignore a diagnostic code that is not produced.",
1000+
"fixStatus": "hasFix"
1001+
},
9871002
{
9881003
"name": "unnecessary_lambdas",
9891004
"description": "Don't create a lambda when a tear-off will do.",
@@ -1074,6 +1089,11 @@
10741089
"description": "Unnecessary `toList()` in spreads.",
10751090
"fixStatus": "hasFix"
10761091
},
1092+
{
1093+
"name": "unnecessary_underscores",
1094+
"description": "Unnecessary underscores can be removed.",
1095+
"fixStatus": "hasFix"
1096+
},
10771097
{
10781098
"name": "unreachable_from_main",
10791099
"description": "Unreachable top-level members in executable libraries.",

0 commit comments

Comments
 (0)