Version 8.8.0

All pages

Style

How Solid Memo's code, data and docs are written. Most of it describes what the code already does. Where the two disagree, the code nearby wins and this page is fixed.

Formatting

Biome formats and lints the TypeScript, JavaScript, JSON and CSS as biome.jsonc says, and npm run check fails on a file it would change. It skips what tools write (the generated vocabulary, the lock files), the vendored files, and the Turtle in decks/ and ns/, which has its own formatter.

npm run format   # rewrite the files as Biome formats them, and apply its safe fixes
npm run lint     # check them, as npm run check does: formatting and lint rules

Biome's recommended lint rules are on, and a problem one finds is fixed. A rule that fires on code that's right is turned off in biome.jsonc, with its reason beside it, only for the files the reason holds for (an overrides entry), or for the whole repository when it holds everywhere. Beyond the recommended rules:

In an editor, Biome's extension (biomejs.biome for VS Code, which .vscode/extensions.json and the dev container recommend; Biome's website lists the others) formats these files by the same biome.jsonc once it's set as their formatter, optionally on save.

.git-blame-ignore-revs lists the SHA of the one commit in which Biome reformatted the code, and nothing else, so GitHub's blame skips it. Running git config blame.ignoreRevsFile .git-blame-ignore-revs once does the same locally. The merge queue merges every pull request with a merge commit, which keeps its commits' SHAs (testing.md), so a pull request that adds a formatting commit can list its SHA before it's merged.

TypeScript

The compiler holds the code to most of the rules (tsconfig.base.json): strict, no unused variables or parameters, and no case falling through in a switch. With verbatimModuleSyntax, a type is imported with import type or type X in the import list.

Naming

WhatHowExample
A modulecamelCase, named for what it holdsdeckPace.ts, cardHistory.ts
A Preact component, and its filePascalCaseAddCardForm.tsx
A function, a variablecamelCase, a function named for what it does or returnspickLocale, shapesRuleset
A type, an interfacePascalCase, no I prefixUseCases, DeckInsight
A constant that is configuration or a tableUPPER_SNAKE_CASELOCALES, ERROR_TEMPLATES
An error code; a message keycamelCase, read as a short sentence; a key grouped by where it shows, with dotsdeckNeedsDescription; footer.createdBy
An RDF termcamelCase for properties, PascalCase for classessm:formatVersion, sm:Deck
A docs pagelowercase, hyphenateddeck-library.md

Names are whole words in the language of the domain (deck, card, review, release), not abbreviations: description, not desc.

Turtle

The hand-written Turtle in ns/, decks/, docs/ (the docs' index) and the vocab package's fixtures/ has a house style, which formatTurtle.ts defines and writes:

npm run format:turtle rewrites the files and npm run format:turtle:check fails on any that differ. A comment stays with the subject it comes before. A published version (vN.ttl under decks/ and ns/shapes/) is formatted once, before it's published, and never changes after. vendor/, other projects' files, is never reformatted.

Comments

Licenses

Every file states its copyright holder and license (REUSE specification), in a header at its top when it can carry a comment:

// SPDX-FileCopyrightText: 2026 Anton Wiklund and Solid Memo contributors
//
// SPDX-License-Identifier: MIT

A new file starts with that header, in its own kind of comment (# in YAML, a Dockerfile or a shell script, /* … */ in CSS). The reuse tool writes it:

reuse annotate --copyright "Anton Wiklund and Solid Memo contributors" --year 2026 --license MIT <file>

A file that can't carry a header, or mustn't be edited, is licensed in REUSE.toml, whose patterns cover new files of its kind. These are the Markdown (kept free of headers), the HTML (whose doctype comes first), JSON, pictures, test fixtures, the generated vocabulary, the published Turtle in decks/ and ns/, and the vendored shapes, under their authors' licenses. Each license's text is in LICENSES/.

A library deck is under the license its dcterms:license states, and REUSE.toml lists each deck, a new one included, under that license. npm run check:reuse, part of npm run check, fails when a version's dcterms:license isn't the license REUSE.toml gives it (testing.md). A deck under a license no deck has used yet needs its SPDX identifier in checkReuse.ts and its text in LICENSES/ (reuse download <SPDX id>).

reuse lint checks that every file has both. It runs in CI's docs job, not in npm run check; npm run lint:reuse runs it locally (testing.md says how to install it).

Docs

Page kinds

Each page in docs/ is one of four kinds, which its entry in the docs' index names (schema:learningResourceType, markdown.md). The kind decides the page's voice, and which rules of the prose check apply to it. npm run check:docs fails on a page without one.

KindWhat it's forVoice
tutorialTakes a newcomer through the app or the code, step by step."you", and imperatives for the steps
how-toThe steps for one task."you", and imperatives for the steps
referenceThe rules and facts: what a part does, and the limits that apply.Neutral
explanationWhy a part is designed the way it is.Neutral

A page that mixes kinds takes the kind of most of its text. The README, the docs' own page, isn't in the index and is a reference page.

Writing

All the docs' prose rules are on this page; no outside style guide applies. The user guide and the pages beside it in "Using the app" are written for a learner, every other page for a new contributor, who knows TypeScript but not this codebase or Solid.

Checked marks a rule that npm run lint:prose checks, and Review a rule only a reviewer can judge.

The Docs and Language sections apply as well.

The prose check

npm run lint:prose, part of npm run check, checks every page in docs/ against the rules in prose.json, each with its reason as its message. checkProse.ts runs it, and prose.ts holds the rules' logic: the project's own code, so it runs offline, and no package's update changes what it accepts.

npm run lint:prose                    # every page
npm run lint:prose -- docs/srs.md     # the pages it names

Language

English is the authoritative language of the code, the docs, commit messages, issues and pull requests, and the source of the app's messages in its other languages (i18n.md).

Commits

A commit is one whole change: the code, its tests and its docs, with npm run check passing, and a generated file (packages/lib/vocab/src/*.generated.ts from ns/) with the change that generated it. Its message follows Conventional Commits, as CONTRIBUTING.md says: a header type(scope): subject of at most 100 characters, a body that says why, wrapped at 72 characters, a Closes: or Refs: line, and a BREAKING CHANGE: line for a breaking change. git log has many examples. The commits before version 1.0.0 have the same body, under a header in sentence case, almost always with no type.