Update and fix lints, require Dart 3.0 (#53)
diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml
index 8dc5276..8ef0f0e 100644
--- a/.github/workflows/dart.yml
+++ b/.github/workflows/dart.yml
@@ -18,7 +18,7 @@
runs-on: ubuntu-latest
strategy:
matrix:
- sdk: [2.17.0, dev]
+ sdk: [3.0, dev]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 89132ec..2d3dd43 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
-## 1.1.2-dev
+## 1.1.2-wip
-- Require Dart 2.17
+- Require Dart 3.0
- Log errors from chrome
- Allow tests to detect headless-only environment (for CI).
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 4a111f3..69e023e 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,5 +1,5 @@
# https://dart.dev/guides/language/analysis-options
-include: package:lints/recommended.yaml
+include: package:dart_flutter_team_lints/analysis_options.yaml
analyzer:
language:
@@ -9,11 +9,8 @@
linter:
rules:
- - always_declare_return_types
- avoid_bool_literals_in_conditional_expressions
- - avoid_catching_errors
- avoid_classes_with_only_static_members
- - avoid_dynamic_calls
- avoid_private_typedef_functions
- avoid_redundant_argument_values
- avoid_returning_null_for_future
@@ -21,35 +18,17 @@
- avoid_unused_constructor_parameters
- avoid_void_async
- cancel_subscriptions
- - comment_references
- - directives_ordering
- join_return_with_assignment
- - lines_longer_than_80_chars
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_runtimeType_toString
- - omit_local_variable_types
- - only_throw_errors
- package_api_docs
- - prefer_asserts_in_initializer_lists
- - prefer_const_constructors
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_locals
- - prefer_relative_imports
- - prefer_single_quotes
- require_trailing_commas
- - sort_pub_dependencies
- - test_types_in_equals
- - throw_in_finally
- - type_annotate_public_apis
- - unawaited_futures
- - unnecessary_lambdas
- - unnecessary_parenthesis
- unnecessary_raw_strings
- - unnecessary_statements
- use_if_null_to_convert_nulls_to_bools
- use_raw_strings
- use_string_buffers
- - use_super_parameters
diff --git a/pubspec.yaml b/pubspec.yaml
index f6043be..952ffe2 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,10 +1,10 @@
name: browser_launcher
-version: 1.1.2-dev
+version: 1.1.2-wip
description: Provides a standardized way to launch web browsers for testing and tools.
repository: https://github.com/dart-lang/browser_launcher
environment:
- sdk: '>=2.17.0 <3.0.0'
+ sdk: ^3.0.0
dependencies:
logging: ^1.0.0
@@ -12,5 +12,5 @@
webkit_inspection_protocol: ^1.0.0
dev_dependencies:
- lints: ^2.0.0
+ dart_flutter_team_lints: ^2.0.0
test: ^1.17.3
diff --git a/test/chrome_test.dart b/test/chrome_test.dart
index b37f56a..9243768 100644
--- a/test/chrome_test.dart
+++ b/test/chrome_test.dart
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
@OnPlatform({'windows': Skip('appveyor is not setup to install Chrome')})
+library;
+
import 'dart:async';
import 'dart:io';