Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to using package:dart_flutter_team_lints #247

Merged
merged 4 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 2 additions & 11 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
# https://dart.dev/guides/language/analysis-options
include: package:lints/recommended.yaml

include: package:dart_flutter_team_lints/analysis_options.yaml

linter:
rules:
- always_declare_return_types
- avoid_dynamic_calls
- avoid_unused_constructor_parameters
- cancel_subscriptions
- comment_references
- directives_ordering
- 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
- package_api_docs
- prefer_relative_imports
- prefer_single_quotes
- test_types_in_equals
- throw_in_finally
- type_annotate_public_apis
- unawaited_futures
- unnecessary_await_in_return
- unnecessary_lambdas
- use_super_parameters
4 changes: 2 additions & 2 deletions lib/command_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ class CommandRunner<T> {
commands = command._subcommands as Map<String, Command<T>>;
commandString += ' ${argResults.name}';

if (argResults.options.contains('help') && argResults['help']) {
if (argResults.options.contains('help') && (argResults['help'] as bool)) {
command.printUsage();
return null;
}
}

if (topLevelResults['help']) {
if (topLevelResults['help'] as bool) {
command!.printUsage();
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ environment:
sdk: '>=2.18.0 <3.0.0'

dev_dependencies:
lints: ^2.0.0
dart_flutter_team_lints: ^1.0.0
test: ^1.16.0
2 changes: 1 addition & 1 deletion test/command_runner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -755,5 +755,5 @@ class _MandatoryOptionCommand extends Command {
String get name => 'mandatory-option-command';

@override
String run() => argResults!['mandatory-option'];
String run() => argResults!['mandatory-option'] as String;
}