DEV Community

Cover image for 5 VS Code Extensions That Make Refactoring Easy

5 VS Code Extensions That Make Refactoring Easy

Alex Omeyer
Co-founder & CEO at Stepsize, SaaS to measure & manage technical debt
・2 min read

If you’re looking at ways to clean up our code, reduce complexity and improve functionality - these refactoring extensions will help you move faster.

1. JavaScript Booster

JavaScript Booster is a code refactoring tool that features several coding actions such as converting var to const or let, removing redundant else statements, and merging declaration and initialization. Just note the light bulb at the left and press it to learn how you can transform the code under the cursor.

Alt Text

2. Stepsize

Stepsize allows you to bookmark and report technical debt and code to refactor. If you come across code that requires refactoring but you don’t have time to do it right away you can make it visible and raise an issue directly in VS Code.

  • Bookmark code while you work & create issues
  • Label your issues
  • Take them to sprint planning meetings & share knowledge with your teammates

Alt Text

3. Abracadabra, refactor this!

With Abracadabra, you can quickly and safely refactor existing code in VS Code.

VS Code ships with a few basic refactorings. Abracadabra supercharges your editor with shortcuts to trigger the most useful ones in no-time, quick fixes to suggest refactorings when appropriate, options to customize the UX to your needs, refactorings that work with .js, .jsx, .ts, .tsx and .vue files.

Alt Text

4. Glean

Glean provides refactoring tools for your React codebase: extract JSX into a new component, convert Class Components to Functional Components, wrapping with Hooks. It allows extracting JSX into new component, converting Class Components to Functional Components and vice-verse, wrapping JSX with conditional, renaming state variables and their setters simultaneously, and more.

Alt Text

5. SonarLint

SonarLint lets you fix coding issues before they exist: like a spell checker, SonarLint highlights Bugs and Security Vulnerabilities as you write code, with clear remediation guidance so you can fix them before the code is even committed. SonarLint in VS Code supports analysis of JavaScript, TypeScript, Python, Java, HTML & PHP code.

Alt Text

Discussion (24)

devfranpr profile image
DevFranPR • Edited

Step 1: Install Stepsize
Step 2: Mark the main project folder as technical debt
Step 3: Cry under your desk
:') :') :') :')

alokjoshi profile image

Sorry but I do not understand? Do you dislike Stepsize?

devfranpr profile image
DevFranPR • Edited

No! Stepsize awsome. My code is the real shit :D

Thread Thread
spiritfox358 profile image

You have a incorrect word

Thread Thread
blindgaenger profile image
Bernd Jünger

so next install SonarLint ;)

Thread Thread
devfranpr profile image

Stepsize 'is' awesome (?) If this is the typo it's suposed to have a coma between the two words for emphasis but I forgot it. Also I'm not a native so my sentences are not perfect so I'm open to bug reports if it helps me doing better in the future.

Thread Thread
blindgaenger profile image
Bernd Jünger

Don't worry, you're doing great. I'm not a native speaker either.

zaxwebs profile image
Zack Webster

Lol, good one.

httvhutceoscop profile image
Viet NT


yatki profile image
Mehmet Yatkı

Hey Alex, thanks for your list. You may wanna take a look at this small extension of mine too :)

GitHub logo yatki / vscode-surround

🔥A simple yet powerful extension to add wrapper templates around your code blocks


Visual Studio Marketplace Visual Studio Marketplace GitHub last commit License

A simple yet powerful extension to add wrapper snippets around your code blocks


  • Supports language identifiers 🚀New!
  • Supports multi selections
  • Fully customizable
  • Custom wrapper snippets
  • You can assign shortcuts for each wrapper snippets separately
  • Nicely formatted
  • Sorts recently used snippets on top 🚀New!

Demo 1: Choosing a wrapper snippet from quick pick menu

Demo 1

Demo 2: Wrapping multi selections

Demo 2

How To Use

After selecting the code block, you can

  • right click on selected code
  • OR press (ctrl+shift+T) or (cmd+shift+T)

to get list of commands and pick one of them.


Each wrapper has a separate command so you can define keybindings for your favorite wrappers by searching surround.with.commandName in the 'Keyboard Shortcuts' section.

List of commands

Command Snippet

surround.with (ctrl+shift+T)
List of all the enabled commands below
surround.with.if if ($condition) { ... }
surround.with.ifElse if ($condition) { ... } else { $else }
surround.with.tryCatch try { ...

Cheers, 🚀🖖

alokjoshi profile image

Checked it out. I always needed something like this. Thanks

alexomeyer profile image
Alex Omeyer Author

Nice, thanks for sharing!

omril321 profile image
Omri Lavi

Hey Alex, thanks for the useful list!
Can you please share more details about SonarLint? How/why is it better than other tools like ESLint (for example)?
Also, I see you're the Co-founder & CEO at Stepsize - doesn't it worth mentioning it somewhere in the list? ;)

alexnaiman profile image
Alexandru Naiman

Is the first time (in a long time) when I see this type of article and it is actually useful; most of the time I feel like "top 5 [blank] vscode thing" are just copies of each other that just point out the most used extensions ever. I get it, they are useful, but I cannot imagine you didn't heard of eslint, gitlens or other thing like that. Nice job

rafajrg21 profile image
Rafael Romero

Good list! Glean is a godsend for me, I was refactoring some code in work last month and the time I would have saved if I just used Glean back then! 😅 Thanks for sharing

naveenchandar profile image


gleisser profile image

Really useful, some I havent heard before

obaino82 profile image

Nice one

anirseven profile image
Anirban Majumdar

This is really helpful , thank you for sharing these.

mogaozq profile image
Mohammad Barbast

I would prefer to do above tasks manually or using vs code built-in features. It's not that hard to use another library.

omril321 profile image
Omri Lavi

Hey Alex, thanks for the list!
Can you please share more details about SonarLint? How/why is it better than other tools like ESLint (for example)?

sanjivj profile image

Wouldn't Anracadabra get in the way of more specific tools like Glean and Javascript Booster?

hybridappdev profile image

I liked Glean, Stepsize and already using SonarLint