supernova_lints 0.0.6 copy "supernova_lints: ^0.0.6" to clipboard
supernova_lints: ^0.0.6 copied to clipboard

Custom lints rules used in Supernova.

Features #

Provides custom lint rules broadly used in supernova.io.

List of currently implemented rules:

missing_this

Requires this expression to be placed in all possible cases.

Exception: usages of State.context and State.setState don't require this expression.

GOOD:

class Model {
  String? property;
  
  String? get getter => this.property;
  
  String? method() {
    return this.property;  
  }
}

BAD:

class Model {
  String? property;
  
  String? get getter => property;

  String? method() {
    return property;
  }
}

prefer_double_quotes_except_directives

Prefer double quotes over single quotes.

Exceptions: directives (import, part, part of, export, library).

GOOD:

final String doubleQuotedString = "";

BAD:

final String singleQuotedString = '';

Usage #

  1. Add the following to your pubspec.yaml file:
dev_dependencies:
  supernova_lints: ^0.0.5
  1. Add the following to your analysis_options.yaml file:
analyzer:
  plugins:
    - custom_lint
  1. Restart your IDE

Additional information #

Feedback and contribution are always welcome at the GitHub repo.

4
likes
120
points
56
downloads

Publisher

unverified uploader

Weekly Downloads

Custom lints rules used in Supernova.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, analyzer_plugin, custom_lint, custom_lint_builder

More

Packages that depend on supernova_lints