Use first() instead of get(0)

Proprietary

first() reads more naturally than get(0) and gives the same compile-time bounds guarantees — both throw NoSuchElementException/IndexOutOfBoundsException on an empty list.

org.openrewrite.kotlin.bestpractices.UseFirstForGetZero$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.bestpractices.UseFirstForGetZero$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.