chassis_lints 2.0.62

SDKdartflutter
Platformandroidioswindowslinuxmacos

Package that contains several rules for code quality improvement recommended for Txp Dev Team.

Chassis lint rules - Layer 1

The Chassis linter is a static analyzer for identifying possible problems in your Dart source code. This package includes official Dart Package Rules, checking anything from potential typing issues, coding style, and formatting. This package - package:chassis_lints - contains the lint settings recommended by the Dart team and Txp Dev Team.

Lint sets

This package includes two sets of lints:

  • Recommended lints: Lints that help identify additional issues that may lead to problems when running or consuming Dart code, and lints that enforce writing Dart using a single, idiomatic style and format. All code is encouraged to pass these lints. The recommended lints include all the core lints.

  • Txp Dev Team lints: Set of specific rules recommended for the Txp Dev Team to avoid issues in the code quality.

Enabling the lints

For new apps created with dart create or for existing apps or packages the recommended set of lints are enabled by default.

You can enable chassis lint with the following:

  1. In the pubspec.yaml, located at the root of your package, add this package:

    dev_dependencies:
      chassis_lints:
        hosted: https://dispub.prod.disney.io/
        version: ^1.0.0
      custom_lint:
    
  2. Create a new analysis_options.yaml file, next to the pubspec, that includes the lints package:

    include: package:chassis_lints/lints.yaml
    
    # Required as chassis lints exposes custom lint rules
    analyzer:
      plugins:
        - custom_lint