Conventions
The seven packages share a small but strict set of conventions. They make code review boring (a good thing), keep type emit fast and ensure every export is documented.
TypeScript
target: "esnext"andmodule: "esnext"— output is always modern ESM.strict: trueplusisolatedDeclarations: true— every public export needs an explicit return type.experimentalDecorators: true—@dto,@bound,@debounce,@adapterrely on stage-2 decorators.- JSX isn't used in any package source.
Code style
4-space indentation everywhere (
.editorconfigis the source of truth).readonlyandfinalclasses preferred where the language permits.Curly braces are required for all control flow, including single-line early returns:
tsif (!user) { return null; }No single-letter variable names other than the canonical
i,e,x,y.Arrow functions for callbacks and inline functions. Class methods are regular methods, not arrow-bound, except when you explicitly need
thisto bind.Imports are flat: classes from the same namespace are grouped on one line:
import { Foo, Bar } from '@scope/pkg'. Namespaces themselves are never grouped.
Releases
- Each package is published to npm independently.
- Conventional Commits (
feat:,fix:,chore:, …) drive the changelog. - Tags are package-scoped:
@basmilius/utils@0.0.0rather than a global version.
Dependencies
- Runtime: keep them minimal.
luxonfor dates,lodash-eswhere the implementation would otherwise be tedious. - Dev: pin to known-good majors; avoid surprise breakage in CI.
- Peers: every Vue-related package declares
vue,vue-routerand/orpiniaas peers.
Documentation
- Every public export is documented under
docs/<package>/. - Pure functions get a single page each.
- Vue components use frontmatter
props,emitsandslotsarrays — rendered by the<FrontmatterDocs/>orchestrator. - Decorators are documented with static code blocks only — no executable Vue SFCs that import them, because esbuild's transform doesn't understand stage-2 decorators inside
<script setup>.