Move imports above other statements

Proprietary

Moves import declarations that appear after other statements to the top of the file, keeping their relative order and leaving any leading directive prologue in place. Replicates the autofix of the ESLint rule import-x/first under its default options.

org.openrewrite.javascript.imports.First
mod run . --recipe=org.openrewrite.javascript.imports.First

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