supernova_lints

Creator: coderz1093

Last updated:

0 purchases

supernova_lints Image
supernova_lints Images

Languages

Categories

Add to Cart

Description:

supernova lints

Features #
Provides custom lint rules broadly used in supernova.io.
List of currently implemented rules:

missing_this
prefer_double_quotes_except_directives

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;
}
}
copied to clipboard
BAD:
class Model {
String? property;

String? get getter => property;

String? method() {
return property;
}
}
copied to clipboard
prefer_double_quotes_except_directives
Prefer double quotes over single quotes.
Exceptions: directives (import, part, part of, export, library).
GOOD:
final String doubleQuotedString = "";
copied to clipboard
BAD:
final String singleQuotedString = '';
copied to clipboard
Usage #

Add the following to your pubspec.yaml file:

dev_dependencies:
supernova_lints: ^0.0.5
copied to clipboard

Add the following to your analysis_options.yaml file:

analyzer:
plugins:
- custom_lint
copied to clipboard

Restart your IDE

Additional information #
Feedback and contribution are always welcome at the GitHub repo.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.