Skip to content

[Dot shorthands] A new lint and fix to prefer dot shorthands #61957

@alex-medinsh

Description

@alex-medinsh

The new dot shorthands feature looks very nice and makes the code cleaner (in most cases). I wish there was a linter rule (and maybe a dart fix) to prefer the shorthand form over the long form, to enforce a single style in a codebase.

I am not yet convinced that all types of shorthands are more readable, so I propose the lints are split for all the different types: enums, constructors, static members etc, so they can be enabled individually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagelinter-lint-proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions