feat(tooling): enforce noUncheckedIndexedAccess from the base tsconfig (NUIA endgame) (#105239)

* feat(tooling): enforce noUncheckedIndexedAccess from the base tsconfig

Completes #104600: the flag moves to tsconfig.json, the five per-lane
copies are removed, and test lanes carry one documented opt-out at their
shared parent (the ~4,400 fixture-indexing sites are a tracked
lane-by-lane follow-up). Any future lane inherits the flag by default.
Synthetic probes verify src rejects unchecked reads while test files
compile; all nine lane commands green.

* fix(memory-core): give the batch-call sort a defined element type

Type-aware lint analyzes test files under the base flag (its tsconfig
extends the root, not the test parent), so the widened call[0] made the
bare toSorted() fire require-array-sort-compare.
This commit is contained in:
Peter Steinberger
2026-07-12 10:57:26 +01:00
committed by GitHub
parent 916d43c9b9
commit 566043eb54
7 changed files with 5 additions and 5 deletions
@@ -880,7 +880,7 @@ describe("memory index", () => {
expect(providerRuntimeBatchCalls).toHaveLength(3);
expect(providerRuntimeBatchCalls.every((call) => call.length === 1)).toBe(true);
expect(providerRuntimeBatchCalls.map((call) => call[0]).toSorted()).toEqual(
expect(providerRuntimeBatchCalls.map((call) => call[0] ?? "").toSorted()).toEqual(
[
"# Log\nAlpha memory line.\nZebra memory line.",
"# Log\nBeta memory line.",
+3
View File
@@ -1,6 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
// Test lanes opt out of noUncheckedIndexedAccess for now (~4,400 fixture
// indexing sites); tracked as a lane-by-lane follow-up to #104600.
"noUncheckedIndexedAccess": false,
"rootDir": "../.."
},
"include": [
-1
View File
@@ -4,7 +4,6 @@
// Node-side production code must not see browser globals; ui/ owns DOM via tsconfig.ui.json.
"lib": ["ES2023"],
// Production indexed reads must account for missing entries.
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"tsBuildInfoFile": ".artifacts/tsgo-cache/core.tsbuildinfo"
-1
View File
@@ -2,7 +2,6 @@
"extends": "./tsconfig.json",
"compilerOptions": {
// Plugin production indexed reads must account for missing entries.
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"tsBuildInfoFile": ".artifacts/tsgo-cache/extensions.tsbuildinfo"
+1
View File
@@ -12,6 +12,7 @@
"moduleResolution": "NodeNext",
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noEmit": true,
"noEmitOnError": true,
"noUncheckedSideEffectImports": true,
-1
View File
@@ -1,7 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"tsBuildInfoFile": ".artifacts/tsgo-cache/scripts.tsbuildinfo"
-1
View File
@@ -2,7 +2,6 @@
"extends": "./tsconfig.json",
"compilerOptions": {
// Control UI indexed reads must account for missing entries.
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"tsBuildInfoFile": ".artifacts/tsgo-cache/ui.tsbuildinfo"