Skip to content

Commit

Permalink
add invalid_runtime_check_with_js_interop_types to the recommended li…
Browse files Browse the repository at this point in the history
…nt set (#199)
  • Loading branch information
devoncarew authored Aug 14, 2024
1 parent 8f93c79 commit 894b500
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [3.4, stable, beta]
sdk: [3.5, stable, beta]

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

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

[unnecessary_library_name]: https://dart.dev/lints/unnecessary_library_name
[invalid_runtime_check_with_js_interop_types]: https://dart.dev/tools/linter-rules/invalid_runtime_check_with_js_interop_types

## 4.0.0

Expand Down
1 change: 1 addition & 0 deletions lib/recommended.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linter:
- empty_statements
- exhaustive_cases
- implementation_imports
- invalid_runtime_check_with_js_interop_types
- library_prefixes
- library_private_types_in_public_api
- no_leading_underscores_for_library_prefixes
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ topics:
- lints

environment:
sdk: ^3.4.0
sdk: ^3.5.0

# NOTE: Code is not allowed in this package - do not add dependencies.
# dependencies:
Expand Down
2 changes: 2 additions & 0 deletions rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
| [`empty_statements`](https://dart.dev/lints/empty_statements) | Avoid empty statements. ||
| [`exhaustive_cases`](https://dart.dev/lints/exhaustive_cases) | Define case clauses for all constants in enum-like classes. ||
| [`implementation_imports`](https://dart.dev/lints/implementation_imports) | Don't import implementation files from another package. | |
| [`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
be platform-consistent. | |
| [`library_prefixes`](https://dart.dev/lints/library_prefixes) | Use `lowercase_with_underscores` when specifying a library prefix. | |
| [`library_private_types_in_public_api`](https://dart.dev/lints/library_private_types_in_public_api) | Avoid using private types in public APIs. | |
| [`no_leading_underscores_for_library_prefixes`](https://dart.dev/lints/no_leading_underscores_for_library_prefixes) | Avoid leading underscores for library prefixes. ||
Expand Down
16 changes: 13 additions & 3 deletions tool/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
},
{
"name": "comment_references",
"description": "Only reference in scope identifiers in doc comments.",
"description": "Only reference in-scope identifiers in doc comments.",
"fixStatus": "hasFix"
},
{
Expand Down Expand Up @@ -531,7 +531,7 @@
},
{
"name": "no_literal_bool_comparisons",
"description": "Don't compare booleans to boolean literals.",
"description": "Don't compare Boolean expressions to Boolean literals.",
"fixStatus": "hasFix"
},
{
Expand Down Expand Up @@ -579,6 +579,11 @@
"description": "Omit type annotations for local variables.",
"fixStatus": "hasFix"
},
{
"name": "omit_obvious_local_variable_types",
"description": "Omit obvious type annotations for local variables.",
"fixStatus": "hasFix"
},
{
"name": "one_member_abstracts",
"description": "Avoid defining a one-member abstract class when a simple function will do.",
Expand Down Expand Up @@ -1086,7 +1091,7 @@
},
{
"name": "use_full_hex_values_for_flutter_colors",
"description": "Prefer an 8-digit hexadecimal integer(0xFFFFFFFF) to instantiate Color.",
"description": "Prefer an 8-digit hexadecimal integer (for example, 0xFFFFFFFF) to instantiate a Color.",
"fixStatus": "hasFix"
},
{
Expand Down Expand Up @@ -1159,6 +1164,11 @@
"description": "Start the name of the method with to/_to or as/_as if applicable.",
"fixStatus": "noFix"
},
{
"name": "use_truncating_division",
"description": "Use truncating division.",
"fixStatus": "hasFix"
},
{
"name": "valid_regexps",
"description": "Use valid regular expression syntax.",
Expand Down

0 comments on commit 894b500

Please sign in to comment.