I have found that the unused import rule does not remove all unused imports. I think this is related or the same issue as
https://github.com/pinterest/ktlint/issues/1587.
I can file a bug/feature request for this but just want to clarify if I should do that or we should reopen the above?
The imports not removed are
import co.[ID].data.session.isLoggedIn
import kotlinx.coroutines.flow.collect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
They are removed via android studio optimize imports but not by ktlint. I ran ktlint 48 through the terminal to test