Find viewModel<X>() calls inside @Composable

Proprietary

viewModel<X>() retrieves a ViewModel scoped to the nearest ViewModelStoreOwner. Inside a generic composable this couples the composable to the host's ViewModelStoreOwner provision — fine at screen entry points, surprising deep in a component tree. Flag to confirm intent.

org.openrewrite.kotlin.compose.FindViewModelInComposable$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.compose.FindViewModelInComposable$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.