Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit 55c79a6

Browse files
committed
add invalid_runtime_check_with_js_interop_types to the recommended lint set
1 parent 8f93c79 commit 55c79a6

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

.github/workflows/validate.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
sdk: [3.4, stable, beta]
20+
sdk: [3.5, stable, beta]
2121

2222
steps:
2323
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
- `recommended`:
44
- added [unnecessary_library_name] (https://github.com/dart-lang/lints/issues/181)
5-
- Updated the SDK lower-bound to 3.4.
5+
- added [invalid_runtime_check_with_js_interop_types] (https://github.com/dart-lang/lints/issues/188)
6+
- Updated the SDK lower-bound to 3.5.
67

78
[unnecessary_library_name]: https://dart.dev/lints/unnecessary_library_name
9+
[invalid_runtime_check_with_js_interop_types]: https://dart.dev/tools/linter-rules/invalid_runtime_check_with_js_interop_types
810

911
## 4.0.0
1012

lib/recommended.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ linter:
2525
- empty_statements
2626
- exhaustive_cases
2727
- implementation_imports
28+
- invalid_runtime_check_with_js_interop_types
2829
- library_prefixes
2930
- library_private_types_in_public_api
3031
- no_leading_underscores_for_library_prefixes

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ topics:
1010
- lints
1111

1212
environment:
13-
sdk: ^3.4.0
13+
sdk: ^3.5.0
1414

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

rules.md

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
| [`empty_statements`](https://dart.dev/lints/empty_statements) | Avoid empty statements. ||
6060
| [`exhaustive_cases`](https://dart.dev/lints/exhaustive_cases) | Define case clauses for all constants in enum-like classes. ||
6161
| [`implementation_imports`](https://dart.dev/lints/implementation_imports) | Don't import implementation files from another package. | |
62+
| [`invalid_runtime_check_with_js_interop_types`](https://dart.dev/lints/invalid_runtime_check_with_js_interop_types) | Avoid runtime type tests with JS interop types where the result may not
63+
be platform-consistent. | |
6264
| [`library_prefixes`](https://dart.dev/lints/library_prefixes) | Use `lowercase_with_underscores` when specifying a library prefix. | |
6365
| [`library_private_types_in_public_api`](https://dart.dev/lints/library_private_types_in_public_api) | Avoid using private types in public APIs. | |
6466
| [`no_leading_underscores_for_library_prefixes`](https://dart.dev/lints/no_leading_underscores_for_library_prefixes) | Avoid leading underscores for library prefixes. ||

tool/rules.json

+13-3
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
},
297297
{
298298
"name": "comment_references",
299-
"description": "Only reference in scope identifiers in doc comments.",
299+
"description": "Only reference in-scope identifiers in doc comments.",
300300
"fixStatus": "hasFix"
301301
},
302302
{
@@ -531,7 +531,7 @@
531531
},
532532
{
533533
"name": "no_literal_bool_comparisons",
534-
"description": "Don't compare booleans to boolean literals.",
534+
"description": "Don't compare Boolean expressions to Boolean literals.",
535535
"fixStatus": "hasFix"
536536
},
537537
{
@@ -579,6 +579,11 @@
579579
"description": "Omit type annotations for local variables.",
580580
"fixStatus": "hasFix"
581581
},
582+
{
583+
"name": "omit_obvious_local_variable_types",
584+
"description": "Omit obvious type annotations for local variables.",
585+
"fixStatus": "hasFix"
586+
},
582587
{
583588
"name": "one_member_abstracts",
584589
"description": "Avoid defining a one-member abstract class when a simple function will do.",
@@ -1086,7 +1091,7 @@
10861091
},
10871092
{
10881093
"name": "use_full_hex_values_for_flutter_colors",
1089-
"description": "Prefer an 8-digit hexadecimal integer(0xFFFFFFFF) to instantiate Color.",
1094+
"description": "Prefer an 8-digit hexadecimal integer (for example, 0xFFFFFFFF) to instantiate a Color.",
10901095
"fixStatus": "hasFix"
10911096
},
10921097
{
@@ -1159,6 +1164,11 @@
11591164
"description": "Start the name of the method with to/_to or as/_as if applicable.",
11601165
"fixStatus": "noFix"
11611166
},
1167+
{
1168+
"name": "use_truncating_division",
1169+
"description": "Use truncating division.",
1170+
"fixStatus": "hasFix"
1171+
},
11621172
{
11631173
"name": "valid_regexps",
11641174
"description": "Use valid regular expression syntax.",

0 commit comments

Comments
 (0)