Discourse Frontend Conventions

Conventions for Discourse frontend code, JavaScript and TypeScript alike (.js/.gjs/.ts/.gts), in core, plugins, and themes, and how they split between what bin/lint enforces and what needs judgment. Use when writing, reviewing, or preparing to commit class-based code or templates. Covers the private-symbols pattern (#, unprefixed, _), the within-bucket member ordering the linter leaves open, the lint-enforced member order, blank lines and banner rules, attribute/argument/modifier ordering on invocations, and the comment necessity gate.

discourse bee4e9e 13.2 KB Updated

File contents

discourse/discourse/tree/main/.skills/discourse-frontend-conventions commit bee4e9e3a8

Frequently asked questions

npx skillmds@latest add discourse/discourse-frontend-conventions