Made by Surf πββοΈπββοΈπββοΈ
This repository contains a list of pre-set presets for DCM that are used on Surf projects:
- All: contains all available lint rules.
- Dart: contains all lint rules applicable to any Dart app.
- Flutter: contains all lint rules applicable to any Flutter app.
- Provider: contains all lint rules for the Provider package.
- Intl: contains all lint rules for the Intl package.
- Pub: contains all lint rules for linting the
pubspec.yaml
files.
Take these steps to enable a preset:
Install this package as a dev dependency:
dart pub add --dev surf_dcm_presets
or:
flutter pub add --dev surf_dcm_presets
For DCM configuration add the extents
entry:
dart_code_metrics:
extends:
- package:surf_dcm_presets/all.yaml
To disable a rule, simply set its value to false:
dart_code_metrics:
extends:
- package:surf_dcm_presets/all.yaml
rules:
- avoid-banned-imports: false
To reconfigure a rule, that is included into a preset:
dart_code_metrics:
extends:
- package:surf_dcm_presets/all.yaml
rules:
- arguments-ordering:
child-last: true
Any other preset can be passed to the extends
entry. To create a custom preset create a yaml
file with the same structure as for regular DCM configuration.
Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.