Coding Style & Linting
ADM enforces a single source-of-truth for style:
- ESLint –
@eslint/js+ custom rules - Prettier – code formatting
- commitlint – conventional-commits
ESLint + Prettier
npm run lint # read-only
npm run format # auto-fix + prettier
CI will fail if npm run lint reports errors or if Prettier formatting changes are uncommitted.
Typical workflow
git checkout -b feat/my-awesome-change
# …code…
npm run format
git add .
git commit -m "feat(core): add awesome change"
The commit message is checked by commitlint. Prefix your commit with one of the following:
| Prefix | Description | Example Commit Command |
|---|---|---|
| feat | A new feature | git commit -m "feat: add new schema" |
| fix | A bug fix | git commit -m "fix: correct null pointer exception" |
| docs | Documentation only changes | git commit -m "docs: update installation instructions" |
| chore | Routine tasks, maintenance, or tooling | git commit -m "chore: update dependency versions" |
| refactor | Code changes that neither fix nor add features | git commit -m "refactor: simplify token validation" |
| test | Adding or updating tests | git commit -m "test: add tests for date parser" |
| perf | Performance improvements | git commit -m "perf: optimize query performance" |
TypeScript strictness
The library is compiled with "strict": true and imports must be path-alias aware (@/…).
Run npm run build to catch any type errors locally.