-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
We're currently using an outdated fork of the Flutter framework's rules in flutter/plugins. Not only is it mostly deprecated, but a lot of the rules there don't really make sense for plugins to follow since it's for the Framework specifically. It probably makes mores sense for our Dart code to match whatever the typical analysis rules would be for a Flutter app.
https://pub.dev/packages/pedantic exists as a common bar for basic Dart lints according to Effective Dart. That's a better standard for us and as a bonus we can relatively easily stay updated over time.
In addition to that we also want to enforce public_member_api_docs going forward. We've spent a decent amount of time going back and adding these after the fact and it would be better to just require them in initial PRs. (See https://github.com/flutter/flutter/projects/66).
I'm going to land the change in a few phases.
- Land the new linter rules with custom
analysis_options.yamlper package with extraignores for anything that they're failing and is non-trivial to fix. This way the new rules can land in a single self-contained PR that's relatively quick to review. - Incrementally go through each package with ignores in their
analysis_options.yamland fix the failing rules, then remove the exclusion.