Marketplace / Browse / coding-style

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.

v1.0.0 12 Units 35 tags 3 axes

Unit counts by external type

KindCount
rule 4
pattern 3
anti-pattern 2
collection 1
principle 1
tradeoff 1

Tag vocabulary

Words a brief might contain that signal this domain.

coding-styletypescriptjavascriptreadabilitymaintainabilitynamingtypesapi-designpatternsanti-patternsrefactoringtestingerror-handlingteamprincipleslintingeslintformattingdocumentationcode-reviewabstractionmodularityarchitecturedesign-patternclean-codestyle-guideconventionsexplicitfunctionclassinterfacegenericsasyncpromiseresult-type

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.

typescriptjavascriptpythongogolangrustjavakotlinswiftcsharpc-sharpruby
scope · 13 matches

Where in the codebase the guidance applies. "public-api" atoms cover module boundaries; "test" atoms cover testing conventions; etc.

public-apiexportedinterfaceboundaryinternalprivateshared-packagelibraryprototypespiketestunit-testintegration-test
concern · 15 matches

The software-quality concern addressed (types, naming, error-handling, …). Briefs that mention a concern surface atoms that address it.

typingtypesnamingreadabilityerror-handlingexceptionstestingdocumentationperformancesecurityrefactoringcomplexitycouplingcohesiondependencies

Sample Units

anti-pattern @team

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.

coding-style ↗ 0 · q0.0
anti-pattern @team

God Class

A class that accumulates responsibilities across multiple domains — handling data fetching, business logic, formatting, caching, and state management all in one place.…

coding-style ↗ 0 · q0.0
collection @team

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.

coding-style ↗ 0 · q0.0
pattern @team

Builder Over Options Bag

When a constructor or factory function takes more than 3–4 parameters, replace the options-bag with a fluent builder.…

coding-style ↗ 0 · q0.0
pattern @team

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.…

coding-style ↗ 0 · q0.0
pattern @team

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.…

coding-style ↗ 0 · q0.0
principle @team

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.

coding-style ↗ 0 · q0.0
rule @team

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.…

coding-style ↗ 0 · q0.0
rule @team

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…

coding-style ↗ 0 · q0.0
rule @team

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.…

coding-style ↗ 0 · q0.0
rule @team

Test Each Public Fn

Any function or method exported from a module must have at least one corresponding test case.…

coding-style ↗ 0 · q0.0
tradeoff @team

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.…

coding-style ↗ 0 · q0.0