mirror of
https://github.com/lichess-org/mobile.git
synced 2026-05-26 13:50:52 +00:00
69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
# This file configures the analyzer, which statically analyzes Dart code to
|
|
# check for errors, warnings, and lints.
|
|
#
|
|
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
|
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
|
# invoked from the command line by running `flutter analyze`.
|
|
|
|
# The following line activates a set of recommended lints for Flutter apps,
|
|
# packages, and plugins designed to encourage good coding practices.
|
|
include: package:lint/strict.yaml
|
|
|
|
analyzer:
|
|
language:
|
|
strict-casts: true
|
|
strict-inference: true
|
|
strict-raw-types: true
|
|
exclude:
|
|
- "**/*.g.dart"
|
|
- "**/*.freezed.dart"
|
|
- lib/src/styles/lichess_icons.dart
|
|
errors:
|
|
invalid_annotation_target: ignore
|
|
plugins:
|
|
- custom_lint
|
|
|
|
linter:
|
|
rules:
|
|
directives_ordering: false
|
|
always_use_package_imports: false
|
|
avoid_redundant_argument_values: false
|
|
sort_pub_dependencies: false
|
|
sort_unnamed_constructors_first: false
|
|
|
|
dart_code_metrics:
|
|
rules:
|
|
# common
|
|
- avoid-collection-methods-with-unrelated-types
|
|
- avoid-double-slash-imports
|
|
- avoid-redundant-async
|
|
- avoid-global-state
|
|
- avoid-late-keyword
|
|
- avoid-unnecessary-type-assertions
|
|
- avoid-unnecessary-type-casts
|
|
- avoid-unrelated-type-assertions
|
|
- prefer-iterable-of
|
|
- prefer-first
|
|
- prefer-immediate-return
|
|
- prefer-iterable-of
|
|
- prefer-last
|
|
|
|
# flutter
|
|
- always-remove-listener
|
|
- avoid-border-all
|
|
- avoid-returning-widgets:
|
|
exclude:
|
|
- test/**
|
|
ignored-annotations:
|
|
- allowedWidgetReturn
|
|
- avoid-shrink-wrap-in-lists
|
|
- avoid-unnecessary-setstate
|
|
- avoid-expanded-as-spacer
|
|
- avoid-wrapping-in-padding
|
|
- check-for-equals-in-render-object-setters
|
|
- consistent-update-render-object
|
|
- prefer-const-border-radius
|
|
- prefer-correct-edge-insets-constructor
|
|
# - prefer-extracting-callbacks
|
|
- use-setstate-synchronously
|