surf_dcm_presets 0.1.0 copy "surf_dcm_presets: ^0.1.0" to clipboard
surf_dcm_presets: ^0.1.0 copied to clipboard

Predefined presets for Dart Code Metrics.

Surf DCM Presets #

Made by Surf 🏄‍♂️🏄‍♂️🏄‍♂️

Build Status Pub Version Pub Likes Pub popularity Flutter Platform

Overview #

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.

Installation #

Take these steps to enable a preset:

Install this package as a dev dependency:

dart pub add --dev surf_dcm_presets
copied to clipboard

or:

flutter pub add --dev surf_dcm_presets
copied to clipboard

Example #

For DCM configuration add the extents entry:

dart_code_metrics:
  extends:
    - package:surf_dcm_presets/all.yaml
copied to clipboard

Disabling or reconfiguring a rule from the preset #

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
copied to clipboard

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
copied to clipboard

Defining a custom preset #

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.

How to reach us #

Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.

Telegram

11
likes
0
points
1.42k
downloads

Publisher

verified publishersurf.ru

Weekly Downloads

2024.09.27 - 2025.04.11

Predefined presets for Dart Code Metrics.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on surf_dcm_presets