Replaces the old analytics_options.yaml with a new analysis_options.yaml at the workspace root, consolidating lint rules and analyzer settings. Updates all references in subprojects to use the new file, and adds flutter_lints as a direct dev dependency in pubspec.yaml for consistent linting across the workspace.
27 lines
701 B
YAML
27 lines
701 B
YAML
include: package:flutter_lints/flutter.yaml
|
|
|
|
analyzer:
|
|
exclude:
|
|
- "**/dataconnect_generated/**"
|
|
- "**/*.g.dart"
|
|
- "**/*.freezed.dart"
|
|
- "**/*.config.dart"
|
|
errors:
|
|
# Set the severity of the always_specify_types rule to warning as requested.
|
|
always_specify_types: warning
|
|
|
|
linter:
|
|
rules:
|
|
# Every variable should have an explicit type.
|
|
- always_specify_types
|
|
|
|
# Additional common best practices not always enforced by default
|
|
- prefer_const_constructors
|
|
- prefer_const_declarations
|
|
- prefer_final_locals
|
|
- avoid_void_async
|
|
- unawaited_futures
|
|
- sort_constructors_first
|
|
- camel_case_types
|
|
- library_private_types_in_public_api
|