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 Updated 48.1k repo stars
github-readme

File contents

discourse/discourse commit bee4e9e3a8

Frequently asked questions

npx get-skill add discourse/discourse-frontend-conventions