mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
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:
@@ -880,7 +880,7 @@ describe("memory index", () => {
|
|||||||
|
|
||||||
expect(providerRuntimeBatchCalls).toHaveLength(3);
|
expect(providerRuntimeBatchCalls).toHaveLength(3);
|
||||||
expect(providerRuntimeBatchCalls.every((call) => call.length === 1)).toBe(true);
|
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\nAlpha memory line.\nZebra memory line.",
|
||||||
"# Log\nBeta memory line.",
|
"# Log\nBeta memory line.",
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"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": "../.."
|
"rootDir": "../.."
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
// Node-side production code must not see browser globals; ui/ owns DOM via tsconfig.ui.json.
|
// Node-side production code must not see browser globals; ui/ owns DOM via tsconfig.ui.json.
|
||||||
"lib": ["ES2023"],
|
"lib": ["ES2023"],
|
||||||
// Production indexed reads must account for missing entries.
|
// Production indexed reads must account for missing entries.
|
||||||
"noUncheckedIndexedAccess": true,
|
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"tsBuildInfoFile": ".artifacts/tsgo-cache/core.tsbuildinfo"
|
"tsBuildInfoFile": ".artifacts/tsgo-cache/core.tsbuildinfo"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// Plugin production indexed reads must account for missing entries.
|
// Plugin production indexed reads must account for missing entries.
|
||||||
"noUncheckedIndexedAccess": true,
|
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"tsBuildInfoFile": ".artifacts/tsgo-cache/extensions.tsbuildinfo"
|
"tsBuildInfoFile": ".artifacts/tsgo-cache/extensions.tsbuildinfo"
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"noImplicitOverride": true,
|
"noImplicitOverride": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
|
"noUncheckedIndexedAccess": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"noEmitOnError": true,
|
"noEmitOnError": true,
|
||||||
"noUncheckedSideEffectImports": true,
|
"noUncheckedSideEffectImports": true,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"noUncheckedIndexedAccess": true,
|
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"tsBuildInfoFile": ".artifacts/tsgo-cache/scripts.tsbuildinfo"
|
"tsBuildInfoFile": ".artifacts/tsgo-cache/scripts.tsbuildinfo"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// Control UI indexed reads must account for missing entries.
|
// Control UI indexed reads must account for missing entries.
|
||||||
"noUncheckedIndexedAccess": true,
|
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"tsBuildInfoFile": ".artifacts/tsgo-cache/ui.tsbuildinfo"
|
"tsBuildInfoFile": ".artifacts/tsgo-cache/ui.tsbuildinfo"
|
||||||
|
|||||||
Reference in New Issue
Block a user