feat(standard): §3.1.1 TypeScript over JavaScript — v1.41 - #20
Merged
Conversation
§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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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": trueplusnoUncheckedIndexedAccess,noImplicitOverride,exactOptionalPropertyTypes. Relaxingstrictis a Priority 1 regression.any, no non-null!in production paths — useunknownand narrow.@ts-ignoreprohibited outright;@ts-expect-errorwith a stated reason instead, so the suppression fails the build once it stops being needed.tsc --noEmitgates CI. esbuild, SWC, and Bun strip types without checking them; a project that only transpiles has not satisfied this section.spacecraft-typescript-guidelinesbefore writing or reviewing TypeScript.Emitted
.jsand 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.jswhere 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
spacecraft-typescript-guidelinesrow.@settitle/@set VERSION/@set UPDATEDbumped;CHANGELOG.mdentry prepended.The_Steelbore_Standard.mdregenerated via the DocBook route.Verification
makeinfo --no-split The_Steelbore_Standard.texi— zero errors, zero warningsreuse lint— compliant.mdcompanion regenerated and spot-checked (§3.1.1 body, checklist bullet, cross-ref row all present)Companion PR in Construct syncs
spacecraft-standard-constitutionto the same version and date.🤖 Generated with Claude Code