We have introduced this module to ensure consistency throughout all projects build @Tapped, this will ensure us fast and secure development.
- Add the following to the
dev_dependenciesin yourpubspec.yamlfile:
dev_dependencies:
flutter_lints: ^1.0.0
tapped_lints:
git:
url: https://github.com/tappeddev/tapped_lints.git
ref: master- Then run
flutter pub getto get the dependencies. - If you don't have the file
analysis_options.yamlin the root of you project - create it. - Add the following to
analysis_options.yaml:
include: package:tapped_lints/flutter.yamlinclude: package:tapped_lints/flutter-3.10.yamlDart Analysis tap: warning: The include file 'package:flutter_lints/flutter.yaml' in '/**/.pub-cache/git/tapped_lints-refnumber/lib/flutter.yaml' can't be found when analyzing '/path/to/module'. (include_file_not_found at [] analysis_options.yaml:1)
- In your
analysis_options.yamlfile you can always add additionalrules/excludes/or any otherlike this:
include: package:tapped_lints/flutter.yaml
linter:
rules:
overridden_fields: false
analyzer:
exclude:
- 'lib/generated/**'