Lightweight npm packages written in modern TypeScript: a formatter, a linter, a monorepo release tool and a test runner. They depend on nothing outside this repository, except esbuild for testero, and are published by aljazmc on npm.
- Four tools, no dependencies. A formatter, a linter, a test runner and a release tool that depend on nothing outside this repository, except esbuild for testero.
- Eight languages. formatero formats CSS, HTML, JavaScript, JSON, JSX, Markdown, TypeScript and YAML; lintero lints all of them but YAML with 287 rules, fixes and sorted imports.
- One parser. Every tool shares
@aljazmc/syntax, bundled in by esbuild. - Checked by itself. formatero formats this repository, lintero lints it and testero runs its tests.
- Released by CI. On every push to
main, monorepo versions, tags and publishes the packages that changed, from their conventional commits.
npm install --save-dev @aljazmc/formatero @aljazmc/lintero
npx formatero # lists unformatted files
npx formatero --write # formats them in placeThe packages need Node.js 22.18+, 24.2+, 25 or 26; each package's README lists its commands and options.
To work on the packages, clone the repository and let Docker do the rest:
git clone https://github.com/aljazmc/aljazmc.git
cd aljazmc
./project.sh start| Package | Description | npm |
|---|---|---|
| formatero | Formats CSS, HTML, JavaScript, JSON, JSX, Markdown, TypeScript and YAML. | |
| lintero | Lints the same languages but YAML with 287 rules, fixes and sorted imports. | |
| monorepo | Versions packages by conventional commits, fixes rebased tags. | |
| testero | Runs Jest-like tests in JavaScript, JSX and TypeScript. |
Bundled into the packages by esbuild, and published for their types.
| Package | Description |
|---|---|
| @aljazmc/config | Loads <package>.config.ts files, finds files and matches globs. |
| @aljazmc/syntax | Parses CSS, HTML, JavaScript, JSON, JSX, Markdown, TypeScript and YAML. |
Requires only Docker with Compose, everything else runs in a container.
The repository checks itself with its own packages: formatero formats it, lintero lints it and organizes its imports, and testero runs its tests. Scripts build the package they run first, so they also work in a fresh clone.
| Command | Description |
|---|---|
./project.sh clean |
Removes the container, dependencies and generated files. |
./project.sh start |
Installs dependencies, then lints, tests and builds all. |
docker compose run --rm node yarn <script> |
Runs any script of package.json. |
docker compose run --rm node node packages/<name>/bin/main.js |
Runs a package on this repository. |
Scripts are named <prefix>:<package>, like c:lintero, and most
prefixes also have <prefix>:all.
| Prefix | Description |
|---|---|
b: |
Builds the package with esbuild. |
c: |
Lints, tests, builds and exports the types. |
ct: |
Checks the types. |
et: |
Exports the types as declaration files. |
l: |
Checks the formatting and lints. |
lw: |
Writes the safe fixes and the formatting. |
lwu: |
Writes the unsafe fixes too. |
p: |
Publishes to npm. |
t: |
Runs the tests. |
te2e: |
Runs the end-to-end tests. |
tunit: |
Runs the unit tests. |
| Script | Description |
|---|---|
t:coverage |
Runs all tests and reports the coverage. |
test:w |
Runs all tests again whenever a file changes. |
typecheck:w |
Checks the types again whenever a file changes. |
push to main
├─> yarn c:<package> checks each changed package
├─> monorepo --push bumps, commits, tags and pushes the versions
└─> yarn p:all publishes the versions not yet on npm, dependencies first
| Path | Description |
|---|---|
<package>.config.ts |
How the packages check this repository. |
packages/<name>/ |
Published packages, each with src/, tests/ and README. |
project.sh |
Creates the container and runs the checks. |
shared/<name>/ |
Code bundled into the packages. |
MIT, see LICENSE.