dart-lang/linter

[Wildcard Variables] Disable the `no_wildcard_variable_uses` lint in >=3.6

kallentu opened this issue · 4 comments

The wildcard variables feature will cover errors that this lint is triggering on for _.
We should disable the lint for any library in which the feature is enabled (>= 3.6, once the flag is enabled).

cc. @pq

We can't actually remove the lint until we stop supporting any language version prior to the version in which wildcard variables is shipped. The reason is that users could still have code that opts back to 3.5 or earlier and might still want the lint enable for that code so that they don't make it harder to migrate that code to the latest version.

What we can do instead is disable the lint for any library in which the feature is enabled. When we get closer to dropping support for pre-3.6 versions we can deprecate the lint, and then after a period of time we can actually remove it. (We don't want to deprecate it in 3.6 because that would be annoying for users that still need it for not-yet-migrated code.)

disable the lint for any library in which the feature is enabled

Ah, this should be the proper action item then.

That sounds good to me.

pq commented

We've got a bit of precedent here and a few other lints that get short-circuited based on the presence of a language feature so I agree that's a good way to go here.

Sorry for the late reply!