fix(ci): eslint ignores *.generated.ts; restore the contract file's header
The on-merge `npm run fix` bot (bc655bfb40, #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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user