-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Dot shorthands] A new lint and fix to prefer dot shorthands #61957
Copy link
Copy link
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagefeature-dot-shorthandsImplementation of the dot shorthands feature.Implementation of the dot shorthands feature.linter-lint-proposal
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagefeature-dot-shorthandsImplementation of the dot shorthands feature.Implementation of the dot shorthands feature.linter-lint-proposal
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.