@ttsc/lint
Lint as compile errors. Format as a write operation. One plugin, one config file, one command pipeline.
$ npx ttsc --noEmit
src/index.ts:1:1 - error TS11966: [no-var] Unexpected var, use let or const instead.
1 var x = 3;
~~~~~~~~~A lint rule. Reported as error TS11966. The same error TSxxxxx shape your editor already underlines, your CI already gates on, and your IDE already takes you to with one click. No second tool, no second config, no second CI step.
The shape of the chapter
- Setup: install and write
lint.config.ts. Five minutes. - Format: the
formatblock. Quotes, semis, trailing commas, print-width reflow. The Prettier surface. - Rules: the lint rule catalog by category.
If you only have five minutes: read Setup, copy the lint.config.ts starter from there, run ttsc fix once, and let the diagnostics tell you the rest.
What you get
- A format block that covers Prettierβs territory: semis, quotes, trailing commas, a print-width reflow. Replaces
prettier. - 720+ lint rules across 21 families (Core, TypeScript, React, JSX-A11y, Promise, Solid, Unicorn, Testing Library, Jest, Vitest, Playwright, Cypress, Storybook, Next.js, TanStack Query, Regexp, Security, JSDoc, Functional, Boundaries, react-perf). Severity per rule (
error/warning/off). Replaceseslint.
Commands
npx ttsc # type-check + lint + format diagnostics
npx ttsc fix # autofix everything (lint and format), then re-check
npx ttsc format # rewrite source files with the format rules onlyttsc fix is a one-shot project pass. It rejects --watch, single-file mode, and --emit. Fixes write to disk before the recheck runs, so source stays modified even when the command exits non-zero on remaining errors. Recommended flow: ttsc fix locally, commit, then CI runs ttsc --noEmit to gate on cleanliness.
What you donβt get (yet)
Custom rule authoring inside @ttsc/lint is plugin-author territory. See Plugin Development Β· Walkthroughs for how @ttsc/lint is itself written.
Next
β Setup