Centralize and update analysis options configuration
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.
This commit is contained in:
26
apps/mobile/analysis_options.yaml
Normal file
26
apps/mobile/analysis_options.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
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
|
||||||
@@ -1 +1 @@
|
|||||||
include: ../../analytics_options.yaml
|
include: ../../analysis_options.yaml
|
||||||
@@ -1 +1 @@
|
|||||||
include: ../../analytics_options.yaml
|
include: ../../analysis_options.yaml
|
||||||
@@ -1 +1 @@
|
|||||||
include: ../../analytics_options.yaml
|
include: ../../analysis_options.yaml
|
||||||
@@ -1,4 +1 @@
|
|||||||
include: package:flutter_lints/flutter.yaml
|
include: ../../analysis_options.yaml
|
||||||
|
|
||||||
# Additional information about this file can be found at
|
|
||||||
# https://dart.dev/guides/language/analysis-options
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
include: ../../analytics_options.yaml
|
include: ../../analysis_options.yaml
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "8.1.6"
|
version: "8.1.6"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: transitive
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
|
sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ workspace:
|
|||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
melos: ^7.3.0
|
melos: ^7.3.0
|
||||||
|
flutter_lints: ^6.0.0
|
||||||
|
|
||||||
melos:
|
melos:
|
||||||
scripts:
|
scripts:
|
||||||
|
|||||||
Reference in New Issue
Block a user