A while back @aaronlademann-wf started a branch to update react-dart's to use workiva_analysis_options and updated lints, and clean things up.
I then based off that branch, made some adjustments, and enabled implicit casts to improve type safety and make things easier when migrating to null safety. I then used that as a base for a null safety branch.
As a result, all of the null safety changes are dependent on these unmerged lint and implicit cast changes.
To get this repo in a better state, and to enable the merge of null safety changes, let's land these lint and implicit cast changes.
Changes
The original commits also ended up getting pretty messy, with some larger commits and quite a few merge commits in between. The changes also were based on workiva_analysis_options v1 instead of v2.
So, I ended up redoing/rebasing most of these changes, splitting them up into very granular and easy-to-review commits, and rebasing the null safety branch on top of those. Shoutout to @aaronlademann-wf for your original work on this! ❤️
For review, I highly recommend reviewing the changes commit-by-commit since there are so many different lint fixes that touch a lot of code. There's a lot of commits, but most of them are either small or dart fix --apply ones that are very easy to review.
Summary of changes:
Upgrade lint configuration to workiva_analysis_options v2, and customize some lints
Fix lints
The vast majority of these are individual commits using dart fix --apply
Fix implicit casts
This was done primarily in one commit, along with related adjustments make variables final and remove LHS typing where possible
The vast majority of these changes occurred in example and test directories; changes to lib were minimal, so the risk of regression here should be pretty low so long as the lib changes are reviewed thoroughly.
I couldn't disable implicit casts an analysis_options since we'd still get a lot of warnings as a result of ReactComponentFactoryProxy.call returning dynamic as opposed to ReactElement. I'd like to change that typing, but since that's technically a major change, let's save that for another PR.
Stop running CI on Dart 3 until we're null-safe (it was failing on this PR)
Motivation
A while back @aaronlademann-wf started a branch to update react-dart's to use workiva_analysis_options and updated lints, and clean things up.
I then based off that branch, made some adjustments, and enabled implicit casts to improve type safety and make things easier when migrating to null safety. I then used that as a base for a null safety branch.
As a result, all of the null safety changes are dependent on these unmerged lint and implicit cast changes.
To get this repo in a better state, and to enable the merge of null safety changes, let's land these lint and implicit cast changes.
Changes
The original commits also ended up getting pretty messy, with some larger commits and quite a few merge commits in between. The changes also were based on workiva_analysis_options v1 instead of v2.
So, I ended up redoing/rebasing most of these changes, splitting them up into very granular and easy-to-review commits, and rebasing the null safety branch on top of those. Shoutout to @aaronlademann-wf for your original work on this! ❤️
For review, I highly recommend reviewing the changes commit-by-commit since there are so many different lint fixes that touch a lot of code. There's a lot of commits, but most of them are either small or
dart fix --apply
ones that are very easy to review.Summary of changes:
dart fix --apply
final
and remove LHS typing where possibleexample
andtest
directories; changes tolib
were minimal, so the risk of regression here should be pretty low so long as thelib
changes are reviewed thoroughly.ReactComponentFactoryProxy.call
returningdynamic
as opposed toReactElement
. I'd like to change that typing, but since that's technically a major change, let's save that for another PR.Testing