Skip to content
View aljazmc's full-sized avatar

Block or report aljazmc

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
aljazmc/README.md

aljazmc

CI/CD License: MIT npm downloads TypeScript 7 esbuild Yarn 4 Docker only Conventional Commits

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.

Features

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

Quick start

npm install --save-dev @aljazmc/formatero @aljazmc/lintero
npx formatero            # lists unformatted files
npx formatero --write    # formats them in place

The 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

Packages

Package Description npm
formatero Formats CSS, HTML, JavaScript, JSON, JSX, Markdown, TypeScript and YAML. @aljazmc/formatero
lintero Lints the same languages but YAML with 287 rules, fixes and sorted imports. @aljazmc/lintero
monorepo Versions packages by conventional commits, fixes rebased tags. @aljazmc/monorepo
testero Runs Jest-like tests in JavaScript, JSX and TypeScript. @aljazmc/testero

Shared code

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.

Development

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

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.

CI/CD

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

Layout

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.

License

MIT, see LICENSE.

Popular repositories Loading

  1. dlib-si-scripts dlib-si-scripts Public

    Download scripts for the Digital Library of Slovenia (dlib.si)

    Shell 3

  2. gog-linux-docker-script gog-linux-docker-script Public

    A script for running GOG games in a Docker container

    Shell 2

  3. yt-dlp-docker-script yt-dlp-docker-script Public

    A script to run yt-dlp in a Docker container

    Shell 2

  4. docker-dev-scripts docker-dev-scripts Public

    One-command Docker development environments for 14 stacks to quickly set-up dockerized development environments

    Shell 2

  5. aljazmc aljazmc Public

    NPMjs packages monorepo

    TypeScript 2

  6. threejs-landscapes threejs-landscapes Public

    Experiments with ThreeJS

    TypeScript 2