Closed bsz0206 closed 1 year ago
Hi! Does the omit_local_variable_types
lint accomplish what you are looking for?
Oh sorry, I didn't realize you opened this issue in package:lints
, not the linter repository itself.
I imagine that package:lints
will not include this lint by default, as some users prefer to always explicitly type variables. You can always enable extra lints yourself though in your project's analysis_options.yaml
file or choose a different prebuilt set which enables it by default.
I think I mentioned it in a wrong thread. I didn't know about omit_local_variable_types
I think I mentioned it in a wrong thread. I didn't know about omit_local_variable_types
Describe the rule you'd like to see added and to what rule set When 'var' can be used (not as Object/dynamic), it should not allow explicit type declaration:
Example: Bad: String a= ""; Map m=<String, dynamic>{};
goog: var a=""; var m=<String, dynamic>{};