**1.0.0**

This commit is contained in:
2026-01-08 14:39:34 +02:00
parent be50a0d570
commit 0d688cedc8
23 changed files with 498 additions and 369 deletions

View File

@@ -1,50 +1,48 @@
include: package:lints/recommended.yaml
include: package:flutter_lints/flutter.yaml
analyzer:
language:
# Ensures the compiler never implicitly assumes 'dynamic' when it cannot infer a type.
strict-inference: true
# Disallows the use of generic types without explicit type arguments (e.g., List instead of List<int>).
strict-raw-types: true
errors:
# Elevates missing required parameters from a warning to a hard compile error.
missing_required_param: error
# Elevates missing return statements in non-void functions to a hard compile error.
missing_return: error
linter:
rules:
# ==== Project Organization Rules ====
# Enforces relative imports to maintain project structure and avoid unnecessary long paths
# Requires explicit return types for all functions and methods to ensure API clarity.
- always_declare_return_types
# Discourages redundant type annotations on closure parameters where inference is sufficient.
- avoid_types_on_closure_parameters
# Requires the @override annotation when a class member overrides a member from a superclass.
- annotate_overrides
# Enforces the use of relative imports for files within the same package to maintain portability.
- prefer_relative_imports
# Ensures that files are named in lowercase_with_underscores format
- file_names
# ==== Best Practices ====
# Enforces the closing of streams and sinks to avoid memory leaks
- close_sinks
# Avoids empty 'else' blocks to reduce confusion and improve code readability
- avoid_empty_else
# Prefer using 'const' constructors wherever possible for better performance and immutability
# Enables the use of the 'super.parameter' syntax in constructors to reduce boilerplate.
- use_super_parameters
# Encourages 'const' constructors for classes to optimize memory and performance.
- prefer_const_constructors
# Avoid leading underscores for local variable names to prevent conflicts and improve clarity
- no_leading_underscores_for_local_identifiers
# ==== Code Consistency ====
# Avoids the use of 'print' statements in production code, encouraging proper logging instead
- avoid_print
# Encourages using 'final' for fields that are not reassigned to promote immutability
# Requires 'const' for variable declarations that are initialized with a constant value.
- prefer_const_declarations
# Encourages declaring local variables as 'final' if they are not reassigned.
- prefer_final_locals
# Encourages declaring private fields as 'final' if they are not reassigned.
- prefer_final_fields
# Ensures that all types are explicitly specified for better readability and type safety
- always_specify_types
# Ensures constructors are at the top of the class for better readability and consistency
- sort_constructors_first
# Avoids redundant default argument values to keep the code clean
- avoid_redundant_argument_values
# Enforces consistency by preferring single quotes over double quotes for string literals
# Triggers a warning when a future is not awaited or explicitly handled, preventing race conditions.
- unawaited_futures
# Prevents accessing BuildContext across asynchronous gaps to avoid runtime crashes.
- use_build_context_synchronously
# Ensures that Sink and StreamController instances are properly closed to prevent memory leaks.
- close_sinks
# Prevents the use of control flow statements (like return or throw) inside a finally block.
- control_flow_in_finally
# Standardizes string literals to use single quotes unless the string contains a single quote.
- prefer_single_quotes
# ==== Documentation Rules ====
# Enforces documentation for all public classes, methods, and fields to improve API clarity
# - public_member_api_docs
# ==== Null Safety ====
# Avoids unnecessary null checks and encourages the use of null-aware operators
- unnecessary_null_checks
# Requires constructors to be placed before other members in a class.
- sort_constructors_first
# Disallows leading underscores for local variables to distinguish them from private class members.
- no_leading_underscores_for_local_identifiers