Nicolas Carlo
Let's build a VS Code extension for automated refactorings
#1about 10 minutes
Scaffolding your first VS Code extension project
Use the Yeoman generator (`yo code`) to quickly create the boilerplate for a new TypeScript-based VS Code extension.
#2about 6 minutes
Running and debugging your first extension
Explore the generated project structure, including `package.json` contributions and the `extension.ts` activation file, then run it in the Extension Development Host.
#3about 10 minutes
Reading and writing code using the VS Code API
Access the active editor's content using `window.activeTextEditor` and modify it programmatically with `editor.edit()`, then add a keybinding for quick access.
#4about 13 minutes
Manipulating code reliably with Abstract Syntax Trees
Overcome the limitations of string manipulation by using Babel to parse code into an Abstract Syntax Tree (AST), traverse it, and generate transformed code.
#5about 7 minutes
Understanding the principles of safe automated refactoring
Learn Martin Fowler's definition of refactoring and see how automating small, behavior-preserving changes like "introduce guard clauses" improves code quality.
#6about 15 minutes
Test-driving the refactoring logic with Mocha
Set up an isolated testing environment with Mocha to test the pure transformation logic, enabling a fast feedback loop with Test-Driven Development (TDD).
#7about 23 minutes
Implementing the refactoring using AST manipulation
Write the logic to identify and transform a nested `if` statement into a guard clause by manipulating its AST nodes and handling different code patterns.
#8about 1 minute
Packaging and publishing your VS Code extension
Use the `vsce` command-line tool to package your extension into a `.vsix` file for private sharing or for publishing to the official VS Code Marketplace.
#9about 6 minutes
Recap and resources for advanced extension development
Review the key steps for building an extension and explore advanced topics like hexagonal architecture for testing and contributing to open-source projects.
#10about 8 minutes
Q&A on extensions, testing, and development tools
The speaker answers audience questions about the VS Code extension ecosystem, security concerns, testing strategies, and using tools like GitHub Copilot.
Related jobs
Jobs that call for the skills explored in this talk.
Hubert Burda Media
München, Germany
€80-95K
Intermediate
Senior
JavaScript
Node.js
+1
Matching moments
14:14 MIN
Scripting presentations and demos in VS Code
Devs vs. Marketers, COBOL and Copilot, Make Live Coding Easy and more - The Best of LIVE 2025 - Part 3
11:32 MIN
The industry's focus on frameworks over web fundamentals
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
04:09 MIN
The emerging market for fixing AI-generated code
Devs vs. Marketers, COBOL and Copilot, Make Live Coding Easy and more - The Best of LIVE 2025 - Part 3
01:32 MIN
Organizing a developer conference for 15,000 attendees
Cat Herding with Lions and Tigers - Christian Heilmann
11:10 MIN
The only frontend stack that truly matters
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
05:26 MIN
Using AI prompts to rebuild a classic 8-bit game
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
03:05 MIN
Building collaborative design tools and the neo-brutalism trend
Slopquatting, API Keys, Fun with Fonts, Recruiters vs AI and more - The Best of LIVE 2025 - Part 2
04:57 MIN
Increasing the value of talk recordings post-event
Cat Herding with Lions and Tigers - Christian Heilmann
Featured Partners
Related Videos
4 Steps from JavaScript to TypeScript
Phil Nash
Vulnerable VS Code extensions are now at your front door
Raul Onitza-Klugman & Kirill Efimov
Keep your code refactorable
Gerrit Stapper
Making Sense of Programming Languages
Aleksandra Sikora
Vue3 practical development
Mikhail Kuznetcov
Do TypeScript without TypeScript
Simone Sanfratello
Extensionator - Rise of the Chromium
Keren Kenzi
Building a large, complex product from the ground up with typescript & Atomic Design:lessons learned
Nathalia Rus
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Confideck GmbH
Vienna, Austria
Remote
Intermediate
Senior
Node.js
MongoDB
TypeScript


Visonum GmbH
Remote
Junior
Intermediate
React
Redux
TypeScript


Eltemate
Amsterdam, Netherlands
Intermediate
Senior
TypeScript
Automated Testing
Continuous Integration

tree-IT GmbH
Bad Neustadt an der Saale, Germany
€54-80K
Intermediate
Senior
Java
TypeScript
Spring Boot

Picnic Technologies B.V.
Amsterdam, Netherlands
Intermediate
Senior
RxJS
Angular
TypeScript

MARKT-PILOT GmbH
Stuttgart, Germany
Remote
€75-90K
Senior
Java
Angular
TypeScript

Adria Solutions ltd
Remote
£100K
Senior
React
Node.js
Next.js
+5