paint-brush
5 Best VS Code Extensions for Refactoring that Every Dev Should Knowby@alexomeyer
5,089 reads
5,089 reads

5 Best VS Code Extensions for Refactoring that Every Dev Should Know

by Alex OmeyerJuly 7th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Abracadabra supercharges your editor with shortcuts to trigger the most useful ones in no time. 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. 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. Glean is a tool for extracting JSX into new components, converting Class Components to Functional Components and vice-verse.

Company Mentioned

Mention Thumbnail
featured image - 5 Best VS Code Extensions for Refactoring that Every Dev Should Know
Alex Omeyer HackerNoon profile picture

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.

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

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.

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 components, converting Class Components to Functional Components and vice-verse, wrapping JSX with conditional, renaming state variables and their setters simultaneously, and more.


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.


Also published on: https://dev.to/alexomeyer/5-vs-code-extensions-that-make-refactoring-easy-1ccb