GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Coding Guidelines

Coding Guidelines

Jump to bottom
Nick Trogh edited this page Oct 2, 2025 · 29 revisions

Intro

These are VS Code coding guidelines. Please also review our Source Code Organisation page.

Indentation

We use tabs, not spaces.

Names

  • Use PascalCase for type names
  • Use PascalCase for enum values
  • Use camelCase for function and method names
  • Use camelCase for property names and local variables
  • Use whole words in names when possible

Types

  • Do not export types or functions unless you need to share it across multiple components
  • Do not introduce new types or values to the global namespace

Comments

  • Use JSDoc style comments for functions, interfaces, enums, and classes

Strings

  • Use "double quotes" for strings shown to the user that need to be externalized (localized)
  • Use 'single quotes' otherwise
  • All strings visible to the user need to be externalized

UI labels

  • Use title case (each major word is capitalized) for command labels, buttons, and menu items
  • Don't capitalize prepositions of four or fewer letters unless it's the first or last word (e.g. "in", "with", "for").
  • Use sentence case (only first word is capitalized) for titles/headings in views and don't end with a period (e.g. "Build with agent mode")

Style

  • Use arrow functions => over anonymous function expressions
  • Only surround arrow function parameters when necessary. For example, (x) => x + x is wrong but the following are correct:
x => x + x
(x, y) => x + y
<T>(x: T, y: T) => x === y
  • Always surround loop and conditional bodies with curly braces
  • Open curly braces always go on the same line as whatever necessitates them
  • Parenthesized constructs should have no surrounding whitespace. A single space follows commas, colons, and semicolons in those constructs. For example:
for (let i = 0, n = str.length; i < 10; i++) {
    if (x < 10) {
        foo();
    }
}

function f(x: number, y: string): void { }
  • Whenever possible, use in top-level scopes export function x(…) {…} instead of export const x = (…) => {…}. One advantage of using the function keyword is that the stack-trace shows a good name when debugging.

Want to contribute to this Wiki?

Fork it and send a pull request.

Project Management

  • Roadmap
  • Iteration Plans
  • Development Process
  • Issue Tracking
    • Issues Triaging
    • Community Issue Tracking
    • Automated Issue Triaging
    • Issue Grooming
  • Build Champion
  • Release Process
  • Running the Endgame
    • Writing Test Plan Items
    • Endgame testing and verification
    • Sanity Check
  • Related Projects

Contributing

  • How to Contribute
  • Submitting Bugs and Suggestions
    • Performance Issues
    • Keybinding Issues
    • Native Crash Issues
    • Search Issues
    • Terminal Issues
    • File Watcher Issues
    • TypeScript Issues
    • Copilot Issues
  • Feedback Channels
  • Source Code Organization
  • Coding Guidelines
  • Testing
    • Writing Tests
    • Smoke Test
  • Dealing with Test Flakiness
  • Contributor License Agreement
  • Extension API Guidelines
  • Accessibility Guidelines
  • Custom ESLint rules

Documentation

  • Extensions
  • API
  • Visual Studio Code
  • Document Repository
  • Multi Root Workspace API

Clone this wiki locally

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.