Linting & Type Checking
Lombok is a Bun workspace monorepo, and every package is held to the same three checks:
- Prettier — code formatting
- TypeScript (
tsc) — type checking - ESLint — linting and import/style rules
These are the same checks CI runs on every pull request, so getting them green locally is the fastest path to a mergeable change.
Quick start
Section titled “Quick start”From the repository root, run all three checks across every package:
./dx check allThis runs Prettier, then TypeScript, then ESLint for each workspace package and
prints a summary of any failures at the end. Unlike the individual commands
below, check all does not stop at the first failure — it runs every check
and reports everything that failed, which is useful before pushing.
Most issues can be fixed automatically:
./dx fix prettier # reformat all packages./dx fix eslint # apply ESLint autofixes across all packagesAfter auto-fixing, re-run ./dx check all to confirm everything passes, then
commit. Type errors (tsc) are never auto-fixed — those you resolve by hand.
[!NOTE] The current
dximplementation supports./dx fix eslint, even though some older docs and help output emphasizefix prettiermore clearly. If this ever changes, treat thedxscript itself as the source of truth.
[!NOTE] These checks run on the host and only need dependencies installed, so you do not need the dev container running just to lint or type check.
Running an individual check
Section titled “Running an individual check”When you only want one kind of check across all packages:
./dx check prettier # formatting only./dx check tsc # type checking only./dx check eslint # linting onlyEach of these stops at the first package that fails. For a full pass that
surveys every package regardless of failures, prefer ./dx check all.
Checking a single package
Section titled “Checking a single package”Each package defines the underlying scripts itself, so you can scope a check to
just the package you’re working on using Bun’s --cwd:
bun --cwd packages/ui prettier:checkbun --cwd packages/ui lint:checkbun --cwd packages/ui tsc:checkThe standard per-package scripts are:
| Script | What it does |
|---|---|
prettier:check | Verify formatting |
prettier:fix | Reformat in place |
lint:check | Run ESLint |
lint:fix | Run ESLint with --fix |
tsc:check | Type check with tsc --noEmit |
Substitute any package directory under packages/ such as packages/api,
packages/core-worker, or packages/types. This is the most efficient loop
while iterating on one package — run only that package’s *:check scripts
rather than the whole monorepo.
What gets checked
Section titled “What gets checked”The dx check and dx fix commands fan out across all workspace packages,
including:
apiuiui-toolkittypessdkutilsauth-utilscore-workerworker-utilsapp-browser-sdkapp-worker-sdk
The bundled demo app (packages/demo-apps/simple-demo) is excluded from the
workspace but is still linted, formatted, and type checked alongside the others.
Configuration
Section titled “Configuration”You usually do not need to touch these files, but it helps to know where the rules live:
- Prettier — a single root
.prettierrcapplies to every package. Ignore patterns live in.prettierignore. - ESLint — each package has its own flat-config
eslint.config.tsthat composes the shared configs in the top-leveleslint-config/directory. - TypeScript — a root
tsconfig.jsonplus per-packagetsconfig*.jsonfiles.tsc:checkrunstsc --noEmit; some packages point it at a specific project file.
Because ESLint runs type-aware rules, a package’s TypeScript project has to resolve for linting to succeed.
Editor integration
Section titled “Editor integration”The repo recommends two VS Code extensions:
- ESLint —
dbaeumer.vscode-eslint - Prettier —
esbenp.prettier-vscode
Workspace settings enable format-on-save with Prettier and defer to ESLint for linting, so most formatting is handled while you write. Type and ESLint errors still surface inline. Running the commands above before pushing remains the most reliable way to match CI.
Continuous integration
Section titled “Continuous integration”CI runs the same per-package prettier:check, lint:check, and tsc:check
scripts on every branch except main. If ./dx check all passes locally, the
linting workflow should usually pass too.