Merge repeated imports of the same module

Proprietary

Merges the named specifiers of repeated imports of one module into the first of them, keeping type-only imports separate from value imports. Replicates the autofix of the ESLint rule import-x/no-duplicates under its default options.

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

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