Skip to content

Commit f3006ef

Browse files
committed
chore: move to latest depes, enable and apply dart_flutter_team_lints
- Move all dependencies to their latest version - Used `--tighten` command to bump min versions to bits that work on the supported SDK - Added `dart_flutter_team_lints` to workspace root `pubspec.yaml` - Centralized `analysis_options.yaml` in the workspace root - Replaced `all_lint_rules.yaml` with standard lint set - Removed redundant `analysis_options.yaml` from packages - Un-ignored previously ignored lints across the codebase - Applied fixes for newly enabled lints, including: - Replacing `null`-checks in lists with spread operator - Standardizing `ignore` comment usage - Removing duplicate/redundant imports - Updating dependency constraints - Fixing local variable shadowing - Removing private typedefs
1 parent f35cf67 commit f3006ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+107
-484
lines changed

all_lint_rules.yaml

Lines changed: 0 additions & 222 deletions
This file was deleted.

analysis_options.yaml

Lines changed: 4 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,14 @@
1-
include: all_lint_rules.yaml
1+
include: package:dart_flutter_team_lints/analysis_options.yaml
22
analyzer:
3+
errors:
4+
lines_longer_than_80_chars: ignore
35
exclude:
46
- packages/dart_firebase_admin/example_server_app/**
57
language:
68
strict-casts: true
79
strict-inference: true
810
strict-raw-types: true
9-
errors:
10-
# Otherwise cause the import of all_lint_rules to warn because of some rules conflicts.
11-
# We explicitly enabled even conflicting rules and are fixing the conflict
12-
# in this file
13-
included_file_warning: ignore
14-
# false positive when using Freezed
15-
invalid_annotation_target: ignore
1611

1712
linter:
1813
rules:
19-
public_member_api_docs: false
20-
21-
# False positive for custom enum-like classes (such as Flutter's "Colors")
22-
avoid_classes_with_only_static_members: false
23-
24-
# False positive when the future is returned by the function
25-
discarded_futures: false
26-
27-
# Low value and lacks a quick fix
28-
combinators_ordering: false
29-
30-
# Low value and high cost to change on all files
31-
eol_at_end_of_file: false
32-
33-
# Conflicts with unused variables
34-
no_leading_underscores_for_local_identifiers: false
35-
36-
# false positive
37-
one_member_abstracts: false
38-
39-
# too verbose
40-
prefer_final_parameters: false
41-
42-
# Too verbose with little value, and this is taken care of by the Flutter devtool anyway.
43-
diagnostic_describe_all_properties: false
44-
45-
# Personal preference. I prefer "if (bool) return;" over having it in multiple lines
46-
always_put_control_body_on_new_line: false
47-
48-
# Personal preference. I don't find it more readable
49-
cascade_invocations: false
50-
51-
# Conflicts with `prefer_single_quotes`
52-
# Single quotes are easier to type and don't compromise on readability.
53-
prefer_double_quotes: false
54-
55-
# Conflicts with `omit_local_variable_types` and other rules.
56-
# As per Dart guidelines, we want to avoid unnecessary types to make the code
57-
# more readable.
58-
# See https://dart.dev/guides/language/effective-dart/design#avoid-type-annotating-initialized-local-variables
59-
always_specify_types: false
60-
61-
# Incompatible with `prefer_final_locals`
62-
# Having immutable local variables makes larger functions more predictable
63-
# so we will use `prefer_final_locals` instead.
64-
unnecessary_final: false
65-
66-
# Not quite suitable for Flutter, which may have a `build` method with a single
67-
# return, but that return is still complex enough that a "body" is worth it.
68-
prefer_expression_function_bodies: false
69-
70-
# Conflicts with the convention used by flutter, which puts `Key key`
71-
# and `@required Widget child` last.
72-
always_put_required_named_parameters_first: false
73-
74-
# This project doesn't use Flutter-style todos
75-
flutter_style_todos: false
76-
77-
# There are situations where we voluntarily want to catch everything,
78-
# especially as a library.
79-
avoid_catches_without_on_clauses: false
80-
81-
# Boring as it sometimes force a line of 81 characters to be split in two.
82-
# As long as we try to respect that 80 characters limit, going slightly
83-
# above is fine.
84-
lines_longer_than_80_chars: false
85-
86-
# Conflicts with disabling `implicit-dynamic`
87-
avoid_annotating_with_dynamic: false
88-
89-
# conflicts with `prefer_relative_imports`
90-
always_use_package_imports: false
91-
92-
# Disabled for now until we have NNBD as it otherwise conflicts with `missing_return`
93-
no_default_cases: false
14+
- unnecessary_ignore

packages/dart_firebase_admin/example/analysis_options.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
name: dart_firebase_admin_example
22
publish_to: none
33

4+
resolution: workspace
5+
46
environment:
57
sdk: '^3.9.0'
68

79
dependencies:
8-
dart_firebase_admin: ^0.1.0
9-
google_cloud_firestore: ^0.1.0
10-
google_cloud_storage: ^0.5.1
11-
12-
dependency_overrides:
1310
dart_firebase_admin:
14-
path: ../../dart_firebase_admin
1511
google_cloud_firestore:
16-
path: ../../google_cloud_firestore
12+
google_cloud_storage: ^0.5.1

packages/dart_firebase_admin/example_server_app/analysis_options.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)