44 lines
1.3 KiB
YAML
44 lines
1.3 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:flutter_lints/flutter.yaml
|
|
|
|
analyzer:
|
|
errors:
|
|
always_declare_return_types: error
|
|
lines_longer_than_80_chars: error
|
|
unused_import: error
|
|
exclude:
|
|
- "**.freezed.dart"
|
|
- "**.g.dart"
|
|
- "**/*.mocks.dart"
|
|
- "lib/generated_plugin_registrant.dart"
|
|
- build/**
|
|
- android/**
|
|
- ios/**
|
|
- web/**
|
|
- windows/**
|
|
- macos/**
|
|
- linux/**
|
|
|
|
linter:
|
|
rules:
|
|
always_declare_return_types: true
|
|
always_use_package_imports: true
|
|
always_specify_types: false
|
|
annotate_overrides: true
|
|
avoid_bool_literals_in_conditional_expressions: true
|
|
avoid_print: true
|
|
eol_at_end_of_file: true
|
|
prefer_single_quotes: true
|
|
sort_pub_dependencies: true
|
|
# require_trailing_commas: true
|
|
constant_identifier_names: false
|
|
directives_ordering: true
|