From 97bdbb4e899bed0874fe3e0e97d533476fecda70 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 27 Apr 2021 16:18:06 -0700 Subject: [PATCH 1/3] Add lints for Flutter apps and packages --- lib/flutter.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/flutter.yaml diff --git a/lib/flutter.yaml b/lib/flutter.yaml new file mode 100644 index 0000000..101a93e --- /dev/null +++ b/lib/flutter.yaml @@ -0,0 +1,18 @@ +# Lints recommended for Flutter apps and packages. +# +# This file is meant to be used in combination with the lints defined in +# core.yaml and recommend.yaml. Consider importing all three files in your +# project's analysis_options.yaml file. +linter: + rules: + - avoid_print + - avoid_unnecessary_containers + - avoid_web_libraries_in_flutter + - no_logic_in_create_state + - prefer_const_constructors + - prefer_const_constructors_in_immutables + - prefer_const_declarations + - prefer_const_literals_to_create_immutables + - sized_box_for_whitespace + - use_full_hex_values_for_flutter_colors + - use_key_in_widget_constructors From 3fddef08be0f9ea6be21c8f2e408282b1c2cb62f Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 27 Apr 2021 16:48:19 -0700 Subject: [PATCH 2/3] include recommend.yaml --- lib/flutter.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/flutter.yaml b/lib/flutter.yaml index 101a93e..f3e9b2b 100644 --- a/lib/flutter.yaml +++ b/lib/flutter.yaml @@ -1,8 +1,7 @@ # Lints recommended for Flutter apps and packages. -# -# This file is meant to be used in combination with the lints defined in -# core.yaml and recommend.yaml. Consider importing all three files in your -# project's analysis_options.yaml file. + +include: package:lints/recommend.yaml + linter: rules: - avoid_print From 400c60bf379bbad5b161148f52a29c0e4fd378f6 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 4 May 2021 14:14:31 -0700 Subject: [PATCH 3/3] change to recommended --- lib/flutter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flutter.yaml b/lib/flutter.yaml index f3e9b2b..167d25d 100644 --- a/lib/flutter.yaml +++ b/lib/flutter.yaml @@ -1,6 +1,6 @@ # Lints recommended for Flutter apps and packages. -include: package:lints/recommend.yaml +include: package:lints/recommended.yaml linter: rules: