A lazy way to make lazy imports
Instead of just writing a quick bash script or codemod, I figured I would take the time to make something a bit more robust and shareable. (This was also for fun) Now I am maintaining my own VS code extension and am already starting to iterate on it too.
This shows the basic functionality of the extension, which is quite simple.
Select an import with your cursor
Supports multiple cursor selections and highlighted selections
Select the component you wish to covert within the JSX return
Use the keyboard shortcut ctrl+opt+cmd+L to make it lazy
Supports selections with multiple cursors and highlighting
will STILL ignore non-default imports even if selected
Tested on Mac, Linux, and Windows OS with 98% test coverage. Though I would typically prefer to write my tests with Jest. Mocha integrates well with the VS Code environment and its always better to choose the right tool for the job.
With a VS code marketplace ranking of 5 stars, 9 Github stars, and 259 downloads (as of writing this) it's starting to gain (a very little bit) of popularity. It's just nice to build software that people are using!
Created to solve the problem of needing to convert a large number of imports
Currently 98% test coverage (macOS, Windows, & Linux) with Mocha
Published to the VS Code marketplace for free use by anyone
A larger longer write up can be found on my blog
I still maintain this project and iterate on it (over 500 downloads! yay!)