From 75b083e9399115b12513385252811f09c3503c90 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Mon, 21 Sep 2026 08:07:25 -0700 Subject: [PATCH] fix(ci): eslint ignores *.generated.ts; restore the contract file's header The on-merge `npm run fix` bot (bc655bfb40f, #118250) ran eslint --fix over apps/shared/src/gateway-contract.generated.ts and stripped its `/* eslint-disable */` header. scripts/gen_gateway_contracts.py emits that header, so tests/tui_gateway/contracts/test_generated.py::test_generated_files_are_current has been red on main since, and on every PR opened after it. Generated files are not lint targets: ignore the pattern in the shared config and regenerate the file. --- apps/shared/src/gateway-contract.generated.ts | 2 +- eslint.config.shared.mjs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.ts index d85544c1bc..e8f793ee7c 100644 --- a/apps/shared/src/gateway-contract.generated.ts +++ b/apps/shared/src/gateway-contract.generated.ts @@ -1,7 +1,7 @@ // GENERATED by scripts/gen_gateway_contracts.py from tui_gateway/contracts — DO NOT EDIT. // Regenerate: .venv/bin/python scripts/gen_gateway_contracts.py // tests/tui_gateway/contracts/test_generated.py fails when this file is stale. - +/* eslint-disable */ // ── Types ── /** Any method the desktop may route to a named profile (``requestGatewayForProfile`` adds ``profile``). */ export interface ProfileParams { diff --git a/eslint.config.shared.mjs b/eslint.config.shared.mjs index 5e0f2c8503..827f2fcbb6 100644 --- a/eslint.config.shared.mjs +++ b/eslint.config.shared.mjs @@ -20,7 +20,9 @@ import globals from 'globals' export default [ { - ignores: ['**/node_modules/**', '**/dist/**', 'src/**/*.js', '**/package-lock.json'] + // *.generated.ts is written by scripts/gen_gateway_contracts.py; the on-merge `npm run fix` bot + // must not rewrite it (it stripped the file's own eslint-disable header and left the tree stale). + ignores: ['**/node_modules/**', '**/dist/**', 'src/**/*.js', '**/package-lock.json', '**/*.generated.ts'] }, js.configs.recommended, {