@jterrazz/typescript 9.3.0 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +20 -16
  2. package/bin/commands/check.sh +387 -146
  3. package/bin/find-tsc.sh +30 -0
  4. package/bin/typescript.sh +79 -1
  5. package/lib/check-architecture.js +89 -0
  6. package/lib/check-baseline.js +144 -0
  7. package/lib/check-docs.js +4 -3
  8. package/lib/check-drift.js +209 -0
  9. package/lib/check-gitignore.js +4 -4
  10. package/lib/check-markdown.js +279 -0
  11. package/lib/check-names.js +125 -0
  12. package/lib/check-publish.js +150 -0
  13. package/lib/check-secrets.js +115 -0
  14. package/lib/check-suppressions.js +355 -0
  15. package/lib/doctor.js +185 -0
  16. package/lib/entry-points.js +91 -0
  17. package/lib/merge-knip-config.js +57 -25
  18. package/lib/tracked-files.js +165 -0
  19. package/lib/unsafe-fixers.js +25 -0
  20. package/lib/workspace-members.js +5 -6
  21. package/package.json +36 -13
  22. package/presets/oxfmt/index.js +49 -5
  23. package/presets/oxlint/profiles/astro.js +10 -0
  24. package/presets/oxlint/profiles/bun.js +7 -0
  25. package/presets/oxlint/profiles/expo.js +7 -0
  26. package/presets/oxlint/profiles/library.js +16 -0
  27. package/presets/oxlint/profiles/next.js +7 -0
  28. package/presets/oxlint/profiles/node.js +7 -0
  29. package/presets/oxlint/profiles/react.js +7 -0
  30. package/presets/prettier/astro.json +6 -0
  31. package/presets/tsconfig/astro.json +25 -0
  32. package/presets/tsconfig/expo.json +16 -6
  33. package/presets/tsconfig/library.json +17 -0
  34. package/presets/tsconfig/next.json +12 -2
  35. package/presets/tsconfig/node.json +18 -4
  36. package/presets/tsconfig/react.json +33 -0
  37. package/presets/tsdown/build.d.ts +13 -0
  38. package/presets/tsdown/bundle.d.ts +13 -0
  39. package/presets/tsdown/bundle.js +10 -1
  40. package/rules/README.md +23 -0
  41. package/rules/_contract.js +207 -0
  42. package/rules/_contract.test.ts +81 -0
  43. package/rules/a11y.js +51 -0
  44. package/rules/architecture/hexagonal.js +56 -0
  45. package/rules/architecture/layers.js +75 -0
  46. package/rules/astro.js +56 -0
  47. package/rules/bundler.js +19 -0
  48. package/rules/catalog.js +166 -0
  49. package/rules/catalog.test.ts +98 -0
  50. package/rules/compile.js +125 -0
  51. package/rules/core/eslint.js +234 -0
  52. package/rules/core/import.js +117 -0
  53. package/rules/core/jsdoc.js +52 -0
  54. package/rules/core/node.js +36 -0
  55. package/rules/core/oxc.js +54 -0
  56. package/rules/core/promise.js +39 -0
  57. package/rules/core/typescript.js +223 -0
  58. package/rules/core/unicorn.js +210 -0
  59. package/rules/next.js +53 -0
  60. package/rules/profiles.js +95 -0
  61. package/rules/react-native.js +48 -0
  62. package/rules/react.js +155 -0
  63. package/rules/sorted.js +41 -0
  64. package/rules/vitest.js +178 -0
  65. package/src/docs.d.ts +4 -4
  66. package/src/docs.js +75 -57
  67. package/src/docs.test.ts +43 -31
  68. package/src/index.d.ts +14 -9
  69. package/src/index.js +17 -8
  70. package/src/oxfmt.d.ts +15 -2
  71. package/src/oxfmt.test.ts +10 -0
  72. package/src/oxlint.d.ts +59 -10
  73. package/src/oxlint.js +36 -50
  74. package/src/oxlint.test.ts +82 -28
  75. package/presets/oxlint/architectures/hexagonal-rules.js +0 -39
  76. package/presets/oxlint/architectures/hexagonal.js +0 -13
  77. package/presets/oxlint/base.js +0 -145
  78. package/presets/oxlint/expo.js +0 -36
  79. package/presets/oxlint/next.js +0 -43
  80. package/presets/oxlint/node.js +0 -14
  81. package/presets/oxlint/plugins/codestyle.js +0 -231
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @jterrazz/typescript
2
2
 
3
- The complete TypeScript toolchain — build, run, check, and document with zero configuration. Powered by tsdown, Oxlint, Oxfmt, TypeScript 7, and Knip.
3
+ The complete TypeScript toolchain — build, run, check, and document with zero configuration. Powered by tsdown, Oxlint, Oxfmt, TypeScript 7, and Knip. Seven profiles, one rulebook: every rule of every plugin it loads is decided by name.
4
4
 
5
5
  ## Installation
6
6
 
@@ -17,8 +17,10 @@ npx typescript start # Run the built application
17
17
  npx typescript dev # Build, run, and rebuild on changes
18
18
  npx typescript docs # Compile the committed docs/reference tree from source
19
19
  npx typescript docs-layout . # Check a repository's docs/ against the manual spine
20
- npx typescript check # Type-check, lint, format-check, and unused-code in parallel
21
- npx typescript fix # Auto-fix lint and formatting issues
20
+ npx typescript check # Every quality pass, in parallel, ending on a drift report
21
+ npx typescript fix # Auto-fix lint, formatting, the .gitignore and suppression spellings
22
+ npx typescript doctor # Installed tool versions against the ranges this release declares
23
+ npx typescript baseline # Record today's oxlint diagnostics, so the count may only fall
22
24
  npx typescript clean # Remove .artifacts/ (dist/ stays — it is the product)
23
25
  ```
24
26
 
@@ -26,16 +28,18 @@ npx typescript clean # Remove .artifacts/ (dist/ stays — it is the p
26
28
 
27
29
  Fully compiled — no JavaScript in the hot path:
28
30
 
29
- | Step | Tool | Language |
30
- | ------------ | ---------------------------------------------------------------- | -------- |
31
- | Transpile | [Oxc](https://oxc.rs) (via tsdown) | Rust |
32
- | Bundle | [Rolldown](https://rolldown.rs) | Rust |
33
- | Declarations | [tsdown](https://tsdown.dev) built-in | Rust |
34
- | Type check | [tsc (TypeScript 7)](https://github.com/microsoft/typescript-go) | Go |
35
- | Lint | [Oxlint](https://oxc.rs/docs/guide/usage/linter) | Rust |
36
- | Format | [Oxfmt](https://oxc.rs/docs/guide/usage/formatter) | Rust |
37
- | Unused code | [Knip](https://knip.dev) | Node |
38
- | API docs | [Typedoc](https://typedoc.org) | Node |
31
+ | Step | Tool | Language |
32
+ | ------------ | --------------------------------------------------------------------------- | -------- |
33
+ | Transpile | [Oxc](https://oxc.rs) (via tsdown) | Rust |
34
+ | Bundle | [Rolldown](https://rolldown.rs) | Rust |
35
+ | Declarations | [tsdown](https://tsdown.dev) built-in | Rust |
36
+ | Type check | [tsc (TypeScript 7)](https://github.com/microsoft/typescript-go) | Go |
37
+ | Lint | [Oxlint](https://oxc.rs/docs/guide/usage/linter) | Rust |
38
+ | Format | [Oxfmt](https://oxc.rs/docs/guide/usage/formatter) | Rust |
39
+ | Unused code | [Knip](https://knip.dev) | Node |
40
+ | Packaging | [publint](https://publint.dev) + [attw](https://arethetypeswrong.github.io) | Node |
41
+ | Layer map | [dependency-cruiser](https://github.com/sverweij/dependency-cruiser) | Node |
42
+ | API docs | [Typedoc](https://typedoc.org) | Node |
39
43
 
40
44
  ## Documentation
41
45
 
@@ -46,12 +50,12 @@ The full corpus lives in [`docs/`](docs/):
46
50
  - [Testing](docs/03-testing.md) — how this toolchain proves itself.
47
51
  - [Operating](docs/04-operating.md) — what publishes it, and which number moves.
48
52
  - [Building](docs/05-building.md) — `build`, `bundle`, `start`, `dev`.
49
- - [Quality checks](docs/06-quality-checks.md) — `check` / `fix` and their passes.
50
- - [Lint presets](docs/07-lint-presets.md) — oxlint presets, `compose`, architecture, knip.
53
+ - [Quality checks](docs/06-quality-checks.md) — `check` / `fix` and their fifteen passes.
54
+ - [Lint presets](docs/07-lint-presets.md) — the rulebook, the seven profiles, `compose`, architecture, knip.
51
55
  - [Docs pipeline](docs/08-docs-pipeline.md) — the `typescript docs` compiler.
52
56
  - [Repo structure](docs/09-repo-structure.md) — pointer to the shared doctrine; what's TypeScript-specific here.
53
57
 
54
- For agents: read the chapters and the generated [`docs/reference/`](docs/reference/) tree straight from the repo, plus the [`skills/jterrazz-typescript`](skills/jterrazz-typescript/SKILL.md) Claude Code skill (the toolchain). The repo-structure doctrine itself is a Claude Code skill too — `jterrazz-repo-structure`, shipped from [`jterrazz-studio`](https://github.com/jterrazz/jterrazz-studio).
58
+ For agents: read the chapters and the generated [`docs/reference/`](docs/reference/) tree straight from the repo, plus the [`skills/jterrazz-typescript`](skills/jterrazz-typescript/SKILL.md) Claude Code skill (the toolchain) and its generated [rule reference](skills/jterrazz-typescript/references/rules.md). The repo-structure doctrine itself is a Claude Code skill too — `jterrazz-repo-structure`, shipped from [`jterrazz-studio`](https://github.com/jterrazz/jterrazz-studio).
55
59
 
56
60
  ## License
57
61