-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Describe the rule you'd like to see implemented
prefer_typed_future is a rule which warns Future without generics.
Examples
This warn
Future result or
Future task(){}.
Future<dynamic> or
Future<void>,
Future<Object?> are allowed.
The motivation is that people should explicit Future<dynamic> when they need.
When you forget to type Future's generics, it will become implicitly Future<dynamic>, which leads to runtime error.(so, this is similar to "implicitly any" in TypeScript)
Therefore, I want this feature to be added.
Additional context
I searched for "future" in Issues, but I wasn't able to find a similar request. Sorry if this feature is duplicated.
Metadata
Metadata
Assignees
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug