non_constant_identifier_names

Stable
Core
Fix available

Name non-constant identifiers using lowerCamelCase.

Details

#

DO name non-constant identifiers using lowerCamelCase.

Class members, top-level definitions, variables, parameters, named parameters and named constructors should capitalize the first letter of each word except the first word, and use no separators.

GOOD:

dart
var item;

HttpRequest httpRequest;

align(clearItems) {
  // ...
}

Enable

#

To enable the non_constant_identifier_names rule, add non_constant_identifier_names under linter > rules in your analysis_options.yaml file:

analysis_options.yaml
yaml
linter:
  rules:
    - non_constant_identifier_names

If you're instead using the YAML map syntax to configure linter rules, add non_constant_identifier_names: true under linter > rules:

analysis_options.yaml
yaml
linter:
  rules:
    non_constant_identifier_names: true