Skip to content

feat(standard): §3.1.1 TypeScript over JavaScript — v1.41 - #20

Merged
UnbreakableMJ merged 1 commit into
mainfrom
standard/v1.41-typescript-over-javascript
Aug 4, 2026
Merged

feat(standard): §3.1.1 TypeScript over JavaScript — v1.41#20
UnbreakableMJ merged 1 commit into
mainfrom
standard/v1.41-typescript-over-javascript

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Summary

Adds §3.1.1 — TypeScript over JavaScript under §3.1 (Priority 1: Stability) and bumps the Standard to v1.41 (2026-08-04).

§3.1 named Rust as the preferred language and prescribed ASLR+CFI where Rust is not viable, but it had nothing to say about the one runtime where that framing does not apply: JavaScript is already memory-safe, so the memory-safety lever is inert — and the section fell silent exactly where a stability rule was still needed.

§3.1.1 supplies it: type safety is the Priority 1 lever on this runtime. Where a memory-safe alternative exists (Rust→Wasm, Rust/Go server, Flutter/Dart UI), §3.1 still chooses it. Where the JavaScript runtime is genuinely required — browser page, Node/Deno/Bun program, Electron app, npm-distributed tool, VS Code extension — the source language MUST be TypeScript, and plain JavaScript source becomes a documented exemption rather than a default.

Requirements

  • "strict": true plus noUncheckedIndexedAccess, noImplicitOverride, exactOptionalPropertyTypes. Relaxing strict is a Priority 1 regression.
  • No any, no non-null ! in production paths — use unknown and narrow.
  • @ts-ignore prohibited outright; @ts-expect-error with a stated reason instead, so the suppression fails the build once it stops being needed.
  • Run-time validation at every trust boundary. A type annotation is a compile-time claim, not a check — asserting an unverified shape is the silent-failure mode §3.1 already forbids.
  • tsc --noEmit gates CI. esbuild, SWC, and Bun strip types without checking them; a project that only transpiles has not satisfied this section.
  • Load spacecraft-typescript-guidelines before writing or reviewing TypeScript.

Emitted .js and source maps in a build directory are derived artifacts and out of scope — the rule governs what is authored and committed.

Exemptions (no filing needed)

A tool's own config that must be .js (e.g. eslint.config.js where no TypeScript loader exists), a vendored or upstream-derived file carried under §4.2, and generated output. Everything else — including "it is only a small script" — needs a documented technical exemption, on the same footing as the §3.1 memory-safe-language exemption.

Also in this PR

  • §16 compliance checklist gains a §3.1.1 bullet (N/A for projects with no JavaScript runtime).
  • Skill Cross-References gains a spacecraft-typescript-guidelines row.
  • @settitle / @set VERSION / @set UPDATED bumped; CHANGELOG.md entry prepended.
  • The_Steelbore_Standard.md regenerated via the DocBook route.

Verification

  • makeinfo --no-split The_Steelbore_Standard.texizero errors, zero warnings
  • reuse lint — compliant
  • .md companion regenerated and spot-checked (§3.1.1 body, checklist bullet, cross-ref row all present)

Companion PR in Construct syncs spacecraft-standard-constitution to the same version and date.

🤖 Generated with Claude Code

§3.1 named Rust as the preferred language and prescribed ASLR+CFI where
Rust is not viable, but said nothing about the one runtime where that
framing does not apply: JavaScript is already memory-safe, so the
memory-safety lever is inert and the section fell silent exactly where a
stability rule was still needed.

§3.1.1 supplies it — type safety is the Priority 1 lever on this runtime.
Where a memory-safe alternative exists, §3.1 still chooses it; where the
JavaScript runtime is genuinely required, the source language MUST be
TypeScript, and plain JavaScript source becomes a documented exemption
rather than a default.

Requirements: strict mode plus noUncheckedIndexedAccess /
noImplicitOverride / exactOptionalPropertyTypes; no `any` or non-null `!`
in production paths; `@ts-expect-error` with a reason instead of
`@ts-ignore`; run-time validation at every trust boundary; `tsc --noEmit`
gating CI (transpile-only pipelines do not satisfy the section); and
loading spacecraft-typescript-guidelines. Emitted .js is a derived
artifact and out of scope.

§16 gains a checklist bullet; the skill cross-reference table gains a
TypeScript row. Version bumped to 1.41 (2026-08-04), .md regenerated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@UnbreakableMJ
UnbreakableMJ merged commit b3acfa0 into main Aug 4, 2026
1 check passed
@UnbreakableMJ
UnbreakableMJ deleted the standard/v1.41-typescript-over-javascript branch August 4, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant