coding-style
Domain plugin for team coding-style and software-engineering knowledge corpora. Covers TypeScript/JavaScript patterns, naming conventions, type discipline, error handling, testing principles, and common code anti-patterns.
Unit counts by external type
| Kind | Count |
|---|---|
| rule | 4 |
| pattern | 3 |
| anti-pattern | 2 |
| collection | 1 |
| principle | 1 |
| tradeoff | 1 |
Tag vocabulary
Words a brief might contain that signal this domain.
Retrieval axes
Domain-specific dimensions supplied to the AOE query runtime.
language · 12 matches
Programming language or ecosystem the brief is about. Atoms targeting a specific language are surfaced preferentially when the brief names that language.
scope · 13 matches
Where in the codebase the guidance applies. "public-api" atoms cover module boundaries; "test" atoms cover testing conventions; etc.
concern · 15 matches
The software-quality concern addressed (types, naming, error-handling, …). Briefs that mention a concern surface atoms that address it.
Sample Units
Comment Explaining Bad Code
Adding a comment to explain why a piece of confusing code works, rather than rewriting the code to be self-explanatory. The comment is a symptom; the underlying code is the disease.
God Class
A class that accumulates responsibilities across multiple domains — handling data fetching, business logic, formatting, caching, and state management all in one place.…
Team Style Guide
A minimal but complete set of code-style atoms for a TypeScript team. Encodes the rules, patterns, anti-patterns, principle, and one key trade-off that define how this team writes and reviews code.
Builder Over Options Bag
When a constructor or factory function takes more than 3–4 parameters, replace the options-bag with a fluent builder.…
Named Arguments
Functions with two or more parameters of the same or similar types, or where parameter order is non-obvious, should use a named-argument object instead of positional parameters.…
Result Type Over Throw
Functions that have expected failure modes (network errors, validation failures, not-found) should return a `Result<T, E>` discriminated union rather than throwing exceptions.…
Readability Over Cleverness
Optimize code for the reader who will maintain it in six months, not for the author who writes it today. If a colleague cannot understand a function in 60 seconds without running it, the function is too clever.
Explicit Return Types
Every function or method that is exported from a module, or is a public class method, must have an explicit return type annotation.…
No Default Export
All module exports must be named exports. Default exports are prohibited. Named exports give the import site a stable, searchable name; default exports allow importers to invent arbitrary names, making global renames, ID…
No Magic Numbers
Numeric literals other than 0 and 1 used in logic or calculations must be named constants. 'Magic numbers' are numeric literals that appear with no explanation — the reader must guess what 86400 or 3.…
Test Each Public Fn
Any function or method exported from a module must have at least one corresponding test case.…
Strict Types Vs Iteration Speed
Full TypeScript strict mode (`strict: true`, `noUncheckedIndexedAccess`) catches a wide class of bugs at compile time — but also imposes upfront friction when exploring an unknown design space.…