Project structure · More
VS Code extension project structure
Opens with creditsA TypeScript extension for Visual Studio Code, built from the official Yeoman generator with esbuild bundling. The example, TODO Lens, finds TODO comments and shows them in a tree view, with commands, settings and editor decorations. The tree grows from the generator's Hello World into commands, providers and editor-free core logic, then tests on three operating systems, publishing to the Marketplace and Open VSX, and a webview with a strict security policy. For students who use VS Code every day and want to build a tool other developers install.
How it grows
Each stage opens the explorer there
- 1Day 1What the scaffold and your first hour give you25 files and folders
- 2GrowingWhat a real app with features and tests adds+41 files and folders
- ProductionWhat running it for real users adds+25 files and foldersOpens with credits
- ExpertWhat a team needs to keep it healthy for years+39 files and foldersOpens with credits
How it is organised
- package.json is half the extension. Its `contributes` section declares every command, setting, view, menu and keybinding, and VS Code reads it before running any of your code. TypeScript implements what package.json promises; the ids must match exactly.
- Activate late and fast. Rely on the activation events VS Code generates from your contributions (a command, a view), avoid `*` and `onStartupFinished` unless you really need them, and keep `activate` to registering things.
- Every listener, command and provider returns a Disposable. Push each one into `context.subscriptions`, so VS Code cleans up after you.
- Keep logic that does not need the editor in `src/core`, with no `vscode` import. It is unit tested in milliseconds and can move into a CLI or language server later. Only `commands/` and `providers/` talk to the VS Code API.
- Use the VS Code APIs for files and settings (`workspace.fs`, `getConfiguration`), not Node's fs and your own JSON files, so the extension works in remote, WSL, container and web workspaces.
- Bundle with esbuild into one `dist/extension.js` and ship only that. A bundled extension activates faster and the .vsix stays small; `.vscodeignore` keeps sources, tests and node_modules out.
- Prefer built-in UI (tree views, quick picks, CodeLens, notifications) over webviews. When you do need a webview, give it a strict Content Security Policy and validate every message.
- Publish from CI only, to both the Marketplace and Open VSX, with a CHANGELOG users can read. Respect the user's telemetry setting and never collect code or file paths.
At the top of the project
Open one in the explorer for the full story
- todo-lens/
- .git/Git history for the extension.
- .vscode/Launch, task and editor settings that make F5 open a second VS Code with your extension loaded.4 inside
- .husky/Git hooks that run lint and type checks before each commit.1 inside
- .vscode-test/Copies of VS Code downloaded by the test runner.
- .editorconfigIndentation and line ending rules for every editor.
- .gitignoreKeeps out, dist, node_modules, .vscode-test and .vsix files out of Git.
- .nvmrcThe Node.js version for building and testing.
- .vscode-test.mjsConfiguration for @vscode/test-cli: which test files, which VS Code version, which workspace.
- .vscodeignoreFiles left out of the packaged .vsix: sources, tests, configs, node_modules, maps.
- CHANGELOG.mdRelease notes, shown on the Changelog tab of your Marketplace page.
- coverage/Test coverage reports from `vscode-test --coverage`.
- dist/The bundled extension: extension.js and its source map, written by esbuild.
- esbuild.jsThe build script: bundles src/extension.ts into dist/extension.js for Node, with vscode left external.
- eslint.config.mjsESLint flat config with typescript-eslint and a few safety rules.
- images/The Marketplace icon and README screenshots.2 inside
- LICENSEThe license for your code.
- media/Icons and assets used inside VS Code: tree view icons, webview CSS and scripts.1 inside
- node_modules/Installed npm packages: TypeScript, esbuild, ESLint and the test tools.
- out/Tests compiled by tsc, which the test CLI runs.
- package-lock.jsonExact versions of every installed package.
- package.jsonThe extension manifest: identity, engine, activation, contributions, scripts.
- README.mdYour Marketplace page: what the extension does, screenshots, settings, commands.
- src/All extension code, bundled by esbuild into dist/extension.js.8 inside
- tsconfig.jsonTypeScript settings: Node16 modules, ES2022, strict mode, root at src.
- vsc-extension-quickstart.mdThe generator's getting-started notes: F5, the debug host, tests, next steps.
Learn more on Sefism
Roadmaps, cheat sheets and projects that go with VS Code extension.
- RoadmapLinux, terminal and Git roadmapShell, Git, SSH and your dev setup
- RoadmapOpen source roadmapFirst contribution to programmes
- Roadmap· TypeScriptSoftware design and clean code roadmapOOP, SOLID, design patterns, refactoring
- Roadmap· GitHub CopilotCoding with AI tools roadmapClaude Code, Cursor, Copilot, used well
- Cheat sheetLinux, terminal and Git cheat sheetShell, Git, SSH and your dev setup.
- Cheat sheetOpen source cheat sheetFirst contribution to programmes.
- FYP idea· IntermediateInstruction File Linter for AI Coding Agents: AGENTS.md, CLAUDE.md, Cursor Rules and Copilot InstructionsBuild a command-line tool and CI check that reads the instruction files AI coding agents load, AGENTS.md, CLAUDE.md, .cursor/rules and .github/copilot-instructions.md, and checks them against the real repository: commands that no longer exist, paths that moved, glob patterns that match nothing, rules that contradict each other across files, and files too long to be followed. Teams using several AI tools get one report that keeps their agents working from the truth.
- FYP idea· BeginnerHallucinated Package Guard for AI Coding Assistants (Slopsquatting Defence)AI coding assistants sometimes suggest packages that do not exist. Attackers can register those names and wait. Build a guard that checks every new dependency added to a project, by a person or an AI, against the real registry: does it exist, how old is it, who maintains it, does it look like a typo of a popular package, and was it suggested by an AI? It runs in the editor, as a pre-commit hook and in CI.
- FYP idea· IntermediateUrdu Explanations for Python Errors with Classroom Error AnalyticsBuild a Python error enhancer that turns tracebacks into short, accurate explanations in Urdu and simple English, using hand-written rules rather than a language model, and gives teachers a dashboard of the errors their class hits most. It extends an open source project, adds Urdu, and runs a classroom study to see whether students fix errors faster.
See 8 moreShow fewer
- FYP idea· AdvancedVulnerable Function Reachability Checker for JavaScript and TypeScript DependenciesBuild a tool that tells a JavaScript or TypeScript team whether their code actually calls the vulnerable function behind each dependency alert, not just whether the package version is affected. Go has this built in with govulncheck; the npm world mostly does not have a free equivalent. The result is fewer, more trustworthy alerts, with a call path as evidence for each one that matters.
- QuestionWhat does proof of work mean for a fresher developer?Proof of work is evidence someone can check in a few minutes that you can do the job: a deployed project real people could use, readable code with tests, a pull request merged into someone else's project, or a clear write-up of a problem you solved. It replaces the experience a fresher does not have yet, so it must be easy to find and easy to verify.
- QuestionShould I learn TypeScript or Python first in 2026?Learn Python first if you are new to programming or drawn to data and AI. Learn TypeScript first only if you already know some JavaScript or are certain about web development, and even then learn plain JavaScript for a few weeks before the types. The second language is much easier than the first.
- QuestionWhich AI tools do employers expect junior developers to know in 2026?Employers rarely require a specific brand. They expect you to use an AI coding assistant well (in the editor and in the terminal), to review and test what it produces, to call an LLM API in a small feature, and to explain when you would not use AI. Pick one assistant, learn it properly, and show judgement in your projects.
- QuestionHow do I learn to write clean code as a junior developer?Clean code is a set of habits, not a book you finish. Fix names, function size, flag arguments and error handling one habit at a time, let a formatter and linter settle style, learn to refactor in small steps behind tests, and keep a list of the review comments you get twice: that list is your personal curriculum.
- Resource· CourseMIT 6.102: Software ConstructionMIT's undergraduate course on writing software that is safe from bugs, easy to understand and ready for change, with every reading free on the public course site. Its readings on specifications, abstract data types, rep invariants, interfaces and code review are the university-level version of good object-oriented design.
- Resource· GuideMarkdown GuideA free, open-source reference that explains every piece of Markdown syntax with side-by-side examples, and shows which apps support which extensions. The fastest way to settle how a table, a nested list or a footnote should be written.
- Resource· GuideBasic Writing and Formatting Syntax (GitHub Docs)GitHub's official page on how Markdown renders in READMEs, issues, pull requests and comments, including GitHub-only features such as alerts, task lists, footnotes, mentions, section links and relative links. The source of truth when something looks different on GitHub.
Checked against 16 official sources, October 2026. If something has changed, the docs win.Show sourcesHide sources
- vscode-generator-code (ext-command-ts template)
- VS Code API: Your first extension
- VS Code API: Extension anatomy
- VS Code API: Contribution points
- VS Code API: Activation events
- VS Code API: Bundling extensions
- VS Code API: Testing extensions
- VS Code API: Continuous integration
- VS Code API: Publishing extensions
- VS Code API: Webview API
- VS Code API: Localization
- VS Code API: Telemetry extension authors guide
- VS Code API: Web extensions
- VS Code API: UX guidelines
- @vscode/vsce on GitHub
- Open VSX: Publishing extensions
Best practices and checklists for this stack
Picked from the other libraries by shared topics.
Best practices
See all- Code Review Best PracticesCode review best practices for reviewers and authors: the approval standard, what to look for, review speed, writing kind and useful comments, handling disagreement and small changes.
- CI/CD Best PracticesBuild pipelines that are fast, trustworthy and safe to deploy from: trunk-based flow, fast tests, locked-down workflows, signed artifacts, canaries and DORA metrics.
- Git Best Practices for DevelopersGit best practices for everyday work: clear commits, clean branches and pull requests, rebase vs merge, safe force pushes, secrets, signing and recovering mistakes.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
- 1:1 Mentorship
- Fresh Graduate Mentorship
- Career Guidance
Brand deals, promos and partnerships: tauseeffayyaz@gmail.com