Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

JavaScript/TypeScript Style Guide

JavaScript and TypeScript code should be formatted using Prettier with its default settings.

You should also use CI to check the formatting of incoming code. GitHub Actions example:

name: Check formatting

on:
  push:
    branches: ["**"]
  pull_request:

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - run: npx prettier . --check