Neil
f107499e44
fix(lint): enable anti-slop/no-reflect-get ( #20786 )
...
`anti-slop/no-reflect-get` rejects every call to `Reflect.get`. The
reflective read bypasses ordinary property access and throws away the
type evidence the compiler would otherwise give you: the result is
`any`/`unknown` with no narrowing, so a typo in the key or a shape drift
in the source object is invisible until runtime. The rule's remedy is to
parse dynamic input into a named domain type (or narrow it with `in`)
and then read the field normally.
Baseline: 86 violations across 67 files. Now zero unsuppressed
violations under
`npx oxlint --config config/oxlint-anti-slop.json --ignore-pattern 'config/oxlint-plugins/anti-slop/**' src config tests mobile`.
Fix pattern
-----------
44 of the 86 were rewritten. The dominant shape was an `unknown` value
read through `Reflect.get` right after a `typeof === 'object'` guard;
those became `in`-narrowed property access, which TypeScript checks:
- Reflect.get(value, 'agents')
+ 'agents' in value ? value.agents : null
Two further shapes:
- `Reflect.get(Object(x), 'k')` on a possibly-primitive envelope became a
small named reader that boxes once and indexes a
`Record<string, unknown>` (`settingsField` in
mobile/src/transport/settings-read-operations.ts).
- Tests reaching into private state moved to TypeScript's checked
bracket-index escape hatch (`runtime['layoutQueues']`), or to a
documented read-only accessor on the owning class
(`SearchSubprocessLineAccumulator.retainedCapacityBytes()`,
`CodexSubagentExecutions.retentionSizes()`).
No type assertion was added anywhere: the diff contains zero net-new
`as` casts, `as any`, `as unknown as`, `@ts-ignore`, or
`@ts-expect-error`, so nothing was laundered into the sibling
assertion rules.
Suppressions
------------
42x `// oxlint-disable-next-line anti-slop/no-reflect-get` across 38
files. Every one is the default-forward branch of a `Proxy` `get` trap:
get(target, property, receiver) {
...
return Reflect.get(target, property, receiver)
}
`Reflect.get(target, property, receiver)` is the only construct that
forwards with correct `receiver` semantics; `target[property]` invokes
an accessor with the wrong `this` and silently breaks getters that read
sibling state. There is no typed alternative, so these are suppressed
rather than rewritten.
3x `// oxlint-disable-next-line typescript-eslint/consistent-type-definitions
-- declaration merging requires interface` in
tests/e2e/github-url-smart-input-transition.spec.ts,
tests/e2e/linear-url-workspace-entry.spec.ts, and
tests/e2e/worktree-active-delete-scroll-position.spec.ts. Replacing
`Reflect.get(window, 'x')` with typed `window.x` requires a
`declare global { interface Window }` block, and `interface` is
mandatory for declaration merging. Matches the existing convention at
tests/e2e/helpers/runtime-types.ts:63.
1x `// eslint-disable-next-line no-var -- main-process gate handle for
this spec` in tests/e2e/project-group-creation-visibility.spec.ts, for
the same reason a `var` global is needed to type the handle. Matches
tests/e2e/agent-session-log-tail-stability.spec.ts:24.
Also updates two source-text anchors in mobile's rpc-recording mutation
harness (mobile/src/test-support/rpc-recording/operation-mutations.ts
and recording-runner.test.ts), which pin the exact text of the rewritten
line in settings-read-operations.ts and would otherwise fail with
"Mutant anchor matched 0 sites, expected 1".
2026-09-15 01:24:30 -07:00
..
2026-09-15 01:24:30 -07:00
2026-09-06 02:48:34 -07:00
2026-09-12 01:19:07 -07:00
2026-07-20 01:14:17 -07:00
2026-09-06 11:23:24 -07:00
2026-09-05 13:39:56 -07:00
2026-08-13 12:48:47 -07:00
2026-07-15 13:25:24 -07:00
2026-07-28 12:33:17 -07:00
2026-07-13 19:13:19 -07:00
2026-07-28 12:33:17 -07:00
2026-06-10 17:23:12 -07:00
2026-08-07 20:36:23 -07:00
2026-08-10 15:52:59 -07:00
2026-08-10 15:52:59 -07:00
2026-08-30 11:45:21 -07:00
2026-08-30 11:45:21 -07:00
2026-06-19 17:14:55 -07:00
2026-06-11 12:46:43 -07:00
2026-09-07 00:25:16 -07:00
2026-08-30 11:45:21 -07:00
2026-07-10 17:27:47 -07:00
2026-07-30 18:51:11 -07:00
2026-08-11 21:16:36 -07:00
2026-06-07 18:16:53 -07:00
2026-07-20 03:04:28 -04:00
2026-06-08 01:00:29 -07:00
2026-08-30 11:45:21 -07:00
2026-06-28 23:13:03 -07:00
2026-09-07 22:34:19 -07:00
2026-09-02 13:42:14 -07:00
2026-08-17 14:53:19 -07:00
2026-07-20 22:04:01 -04:00
2026-08-12 16:07:08 -07:00
2026-08-03 13:02:56 -07:00
2026-08-17 14:53:19 -07:00
2026-08-03 13:02:56 -07:00
2026-09-04 23:31:25 -04:00
2026-09-04 23:31:25 -04:00
2026-08-11 03:07:44 -07:00
2026-09-14 01:45:34 -07:00
2026-08-31 02:46:17 -04:00
2026-08-25 15:36:51 -07:00
2026-08-29 15:43:36 -07:00
2026-09-05 21:38:35 -07:00
2026-06-29 23:37:30 -07:00
2026-08-11 18:19:43 -07:00
2026-08-25 15:36:51 -07:00
2026-08-11 18:19:43 -07:00
2026-08-04 22:07:30 -07:00
2026-07-20 18:18:11 -07:00
2026-09-06 14:34:03 -04:00
2026-09-08 05:14:59 -04:00
2026-06-07 17:49:01 -07:00
2026-08-15 00:41:45 -07:00
2026-08-06 21:18:52 -07:00
2026-08-29 01:50:38 -07:00
2026-06-17 20:05:55 -07:00
2026-08-17 23:28:38 -07:00
2026-07-21 20:51:28 -07:00
2026-08-07 22:33:50 -07:00
2026-06-29 22:38:29 -07:00
2026-07-25 13:42:28 -07:00
2026-06-29 22:38:29 -07:00
2026-05-13 18:48:14 -07:00
2026-05-13 18:48:14 -07:00
2026-08-03 22:55:17 -07:00
2026-08-22 21:40:47 -07:00
2026-05-30 22:46:38 -07:00
2026-05-30 22:46:38 -07:00
2026-07-26 23:48:20 -07:00
2026-07-06 02:12:32 -07:00
2026-06-19 17:14:55 -07:00
2026-08-23 14:25:03 -07:00
2026-09-05 14:18:22 -07:00
2026-08-14 19:04:55 -04:00
2026-09-07 19:24:34 -07:00
2026-09-05 14:18:22 -07:00
2026-09-05 19:45:42 -07:00
2026-04-27 20:55:47 -07:00
2026-08-24 19:32:52 -07:00
2026-06-22 16:27:33 -07:00
2026-07-29 21:43:45 -07:00
2026-08-26 22:17:59 -07:00
2026-09-06 18:48:40 -07:00
2026-08-30 15:14:49 -07:00
2026-09-05 13:39:56 -07:00
2026-09-05 13:39:56 -07:00
2026-09-14 14:54:53 -07:00
2026-08-14 00:33:15 -07:00
2026-09-06 00:31:07 -07:00
2026-07-05 19:46:49 -07:00
2026-08-11 03:07:44 -07:00
2026-09-15 01:24:30 -07:00
2026-09-13 15:43:12 -07:00
2026-08-17 23:28:38 -07:00
2026-09-06 03:29:05 -07:00
2026-09-06 03:29:05 -07:00
2026-08-13 10:31:08 -07:00
2026-09-09 10:42:18 -07:00
2026-08-13 09:56:30 -07:00
2026-09-06 01:48:47 -07:00
2026-08-13 00:58:55 -07:00
2026-08-13 00:58:55 -07:00
2026-08-13 10:26:20 -07:00
2026-08-13 10:31:08 -07:00
2026-08-13 09:31:20 -07:00
2026-08-13 09:56:30 -07:00
2026-08-31 22:22:17 -04:00
2026-08-24 08:58:19 -07:00
2026-08-28 00:55:45 -07:00
2026-08-12 21:28:32 -07:00
2026-09-07 19:24:34 -07:00
2026-08-26 12:48:52 -07:00
2026-07-31 00:22:53 -07:00
2026-07-29 20:04:55 -07:00
2026-08-21 17:11:17 -07:00
2026-08-05 12:57:02 -07:00
2026-08-05 17:49:04 -07:00
2026-08-19 15:47:31 -07:00
2026-08-25 15:36:51 -07:00
2026-08-19 15:47:31 -07:00
2026-09-02 14:05:29 -07:00
2026-08-11 18:19:43 -07:00
2026-07-31 18:01:24 -07:00
2026-08-31 09:20:12 -07:00
2026-08-04 22:07:30 -07:00
2026-07-20 14:50:12 -07:00
2026-08-04 12:37:59 -07:00
2026-08-09 16:35:24 -07:00
2026-09-15 01:24:30 -07:00
2026-09-05 16:11:04 -07:00
2026-08-21 17:11:17 -07:00
2026-08-25 15:36:51 -07:00
2026-07-22 16:10:53 -07:00
2026-08-27 13:44:03 -07:00
2026-08-25 16:46:42 -07:00
2026-07-17 18:57:26 -07:00
2026-07-23 23:18:03 -07:00
2026-09-14 16:36:06 -07:00
2026-08-27 16:59:38 -07:00
2026-05-25 16:43:22 -07:00
2026-07-04 23:29:05 -07:00
2026-07-31 01:57:41 -07:00
2026-06-22 12:29:18 -07:00
2026-09-05 13:39:56 -07:00
2026-08-13 22:48:24 -07:00
2026-09-11 18:37:16 -07:00
2026-09-10 21:52:21 -07:00
2026-09-14 18:31:40 -07:00
2026-09-06 09:51:31 -07:00
2026-07-22 18:25:05 -07:00
2026-09-07 19:24:34 -07:00
2026-09-07 19:24:34 -07:00
2026-07-30 03:05:10 -07:00
2026-08-13 22:48:24 -07:00
2026-09-14 13:56:18 -07:00
2026-08-13 22:48:24 -07:00
2026-07-19 11:27:29 -07:00
2026-09-11 18:37:16 -07:00
2026-09-06 14:34:03 -04:00
2026-08-23 09:45:52 -07:00
2026-08-23 09:45:52 -07:00
2026-08-09 14:49:36 -07:00
2026-07-30 00:49:23 -07:00
2026-07-30 00:49:23 -07:00
2026-09-06 20:16:38 -07:00
2026-09-06 14:34:03 -04:00
2026-09-06 14:34:03 -04:00
2026-09-07 19:29:53 -07:00
2026-08-25 15:36:51 -07:00
2026-08-13 22:40:58 -07:00
2026-09-07 22:34:19 -07:00
2026-08-21 17:11:17 -07:00
2026-08-25 15:36:51 -07:00
2026-08-31 19:47:27 -07:00
2026-08-31 19:47:27 -07:00
2026-08-25 15:36:51 -07:00
2026-08-25 15:36:51 -07:00
2026-08-31 19:47:27 -07:00
2026-08-25 15:36:51 -07:00
2026-09-06 20:09:39 -07:00
2026-09-06 18:55:26 -07:00
2026-08-25 23:18:30 -07:00
2026-08-25 15:36:51 -07:00
2026-08-29 22:38:59 -07:00
2026-08-23 16:47:12 -07:00
2026-08-25 15:36:51 -07:00
2026-09-02 10:39:46 -07:00
2026-08-25 15:36:51 -07:00
2026-09-06 19:14:37 -07:00
2026-08-13 22:48:24 -07:00
2026-08-30 03:07:20 -04:00
2026-09-08 00:37:21 -07:00
2026-08-25 15:36:51 -07:00
2026-09-05 17:26:54 -07:00
2026-08-30 03:11:55 -04:00
2026-09-05 23:44:45 -07:00
2026-08-03 19:44:30 -07:00
2026-07-30 18:27:06 -07:00
2026-07-30 03:05:10 -07:00
2026-08-31 08:17:40 -07:00
2026-09-05 21:08:18 -07:00
2026-07-29 20:04:55 -07:00
2026-09-11 04:50:42 -07:00
2026-07-29 20:04:55 -07:00
2026-09-05 16:43:41 -07:00
2026-08-25 15:36:51 -07:00
2026-08-12 22:33:19 -07:00
2026-09-05 13:39:56 -07:00
2026-08-29 22:37:05 -07:00
2026-08-23 12:21:15 -07:00
2026-09-07 19:35:19 -07:00
2026-07-27 17:56:07 -07:00
2026-07-27 17:56:07 -07:00
2026-07-28 12:33:17 -07:00
2026-07-27 17:56:07 -07:00
2026-09-06 19:14:42 -07:00
2026-08-22 16:08:21 -07:00
2026-09-12 01:19:07 -07:00
2026-09-15 01:24:30 -07:00
2026-07-15 17:14:10 -07:00
2026-08-20 02:15:42 -07:00
2026-08-01 00:00:12 -07:00
2026-09-12 01:19:07 -07:00
2026-09-12 16:00:54 -07:00
2026-09-11 11:43:48 -07:00
2026-09-02 23:32:41 -07:00
2026-09-06 19:14:39 -07:00
2026-08-13 12:38:08 -07:00
2026-08-13 22:48:24 -07:00
2026-08-25 15:36:51 -07:00
2026-07-12 22:40:57 -07:00
2026-08-13 22:48:24 -07:00
2026-08-03 22:48:37 -07:00
2026-09-12 20:35:48 -07:00
2026-07-27 19:04:56 -07:00
2026-06-29 22:38:29 -07:00
2026-09-05 17:26:54 -07:00
2026-07-17 17:18:36 -07:00
2026-09-10 17:42:50 -07:00
2026-07-12 22:40:57 -07:00
2026-09-05 15:12:19 -07:00
2026-07-28 20:51:14 -07:00
2026-09-11 03:19:01 -04:00
2026-09-11 15:28:16 -07:00
2026-08-26 22:30:48 -07:00
2026-09-11 15:28:16 -07:00
2026-09-05 15:12:19 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-08 17:15:43 -07:00
2026-08-13 02:56:43 -07:00
2026-09-08 05:14:59 -04:00
2026-08-13 02:56:43 -07:00
2026-09-05 15:04:52 -07:00
2026-09-05 15:04:52 -07:00
2026-08-09 01:32:34 -07:00
2026-09-11 18:37:16 -07:00
2026-07-05 19:46:49 -07:00
2026-07-25 19:31:44 -07:00
2026-09-06 02:03:40 -07:00
2026-09-06 11:25:52 -07:00
2026-08-13 12:38:08 -07:00
2026-08-31 14:56:15 -04:00
2026-09-06 01:09:18 -07:00
2026-09-05 17:39:02 -07:00
2026-09-05 17:39:02 -07:00
2026-09-07 19:29:53 -07:00
2026-09-07 19:29:53 -07:00
2026-07-04 22:56:55 -07:00
2026-08-25 15:36:51 -07:00
2026-08-25 15:36:51 -07:00
2026-09-06 11:25:58 -07:00
2026-06-22 16:42:20 -07:00
2026-09-06 11:25:58 -07:00
2026-09-06 11:25:58 -07:00
2026-09-06 11:25:58 -07:00
2026-09-05 17:24:12 -07:00
2026-06-22 16:42:20 -07:00
2026-08-27 19:40:38 -07:00
2026-09-06 20:00:08 -07:00
2026-08-11 03:07:44 -07:00
2026-08-28 00:59:21 -07:00
2026-08-13 08:58:04 -07:00
2026-09-06 07:42:50 -07:00
2026-09-07 19:51:44 -07:00
2026-09-05 13:53:27 -07:00
2026-09-02 05:36:54 -07:00
2026-08-29 20:15:10 -07:00
2026-08-10 17:33:46 -07:00
2026-09-06 14:39:25 -04:00
2026-09-02 15:58:42 -07:00
2026-09-06 20:24:21 -07:00
2026-07-12 23:50:00 -07:00
2026-08-25 15:36:51 -07:00
2026-07-24 12:05:38 -07:00
2026-08-02 20:43:27 -07:00
2026-09-06 10:37:04 -07:00
2026-08-27 19:47:15 -07:00
2026-08-28 14:16:50 -07:00
2026-07-31 00:36:09 -07:00
2026-08-27 19:40:38 -07:00
2026-08-27 19:40:38 -07:00
2026-08-25 15:36:51 -07:00
2026-08-25 15:36:51 -07:00
2026-09-05 16:43:41 -07:00
2026-08-12 22:33:19 -07:00
2026-08-26 09:50:12 -07:00
2026-07-20 18:54:44 -07:00
2026-07-20 18:54:44 -07:00
2026-08-16 13:45:54 -07:00
2026-08-24 22:46:29 -07:00
2026-08-04 17:11:18 -07:00
2026-09-14 10:28:16 -07:00
2026-09-10 14:54:09 -07:00
2026-07-10 17:27:47 -07:00
2026-07-05 21:51:32 -07:00
2026-08-17 23:28:38 -07:00
2026-09-12 19:56:29 -07:00
2026-06-19 17:14:55 -07:00
2026-09-05 16:11:04 -07:00
2026-05-16 11:50:26 -07:00
2026-09-06 19:15:57 -07:00
2026-09-11 18:37:16 -07:00
2026-08-10 15:52:59 -07:00
2026-08-03 21:00:57 -07:00
2026-08-14 01:47:03 -07:00
2026-06-29 22:38:29 -07:00
2026-07-20 03:04:28 -04:00
2026-09-05 16:26:36 -07:00
2026-08-08 19:06:50 -07:00
2026-09-07 19:24:34 -07:00
2026-07-14 02:58:34 -07:00
2026-07-05 21:51:32 -07:00
2026-06-20 02:03:24 -07:00
2026-09-02 13:05:24 -07:00
2026-06-10 21:14:53 -07:00
2026-06-19 19:43:42 -07:00
2026-09-06 19:27:12 -07:00
2026-08-30 11:45:21 -07:00
2026-08-16 01:16:11 -07:00
2026-09-06 19:27:12 -07:00
2026-09-06 19:02:54 -07:00
2026-08-17 17:12:40 -07:00
2026-08-26 19:49:26 -07:00
2026-08-30 11:45:21 -07:00
2026-08-30 11:45:21 -07:00
2026-07-12 22:40:57 -07:00
2026-08-30 01:58:32 -07:00
2026-06-09 13:52:58 -07:00
2026-08-08 19:06:50 -07:00
2026-08-09 16:06:00 -07:00
2026-08-14 01:47:03 -07:00
2026-08-30 01:58:32 -07:00
2026-07-29 16:12:20 -07:00
2026-08-30 03:12:22 -07:00
2026-08-08 19:06:50 -07:00
2026-08-30 02:23:04 -07:00
2026-08-11 00:10:40 -07:00
2026-08-14 01:47:03 -07:00
2026-08-29 14:13:35 -07:00
2026-07-19 22:54:39 -04:00
2026-08-15 00:13:27 -07:00
2026-08-30 02:23:04 -07:00
2026-08-30 03:12:22 -07:00
2026-08-14 01:47:03 -07:00
2026-06-19 17:14:55 -07:00
2026-08-11 12:27:54 -07:00
2026-08-11 18:19:43 -07:00
2026-07-30 03:05:10 -07:00
2026-07-10 17:27:47 -07:00
2026-08-08 19:06:50 -07:00
2026-08-09 18:40:01 -07:00
2026-08-13 10:26:20 -07:00
2026-09-07 19:29:53 -07:00
2026-06-20 01:27:41 -07:00
2026-06-20 01:27:41 -07:00
2026-08-16 12:49:02 -07:00
2026-08-30 11:45:21 -07:00
2026-06-27 09:30:29 -07:00
2026-08-13 23:59:18 -07:00
2026-08-15 00:54:20 -07:00
2026-07-12 22:40:57 -07:00
2026-08-15 00:54:20 -07:00
2026-09-05 20:59:33 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-31 08:17:40 -07:00
2026-07-14 00:15:34 -07:00
2026-07-29 00:47:18 -07:00
2026-08-11 18:19:43 -07:00
2026-07-15 20:28:39 -07:00
2026-06-24 20:16:14 -07:00
2026-07-17 17:18:36 -07:00
2026-07-17 17:18:36 -07:00
2026-06-20 02:03:24 -07:00
2026-07-16 13:26:15 -07:00
2026-09-11 04:50:42 -07:00
2026-06-22 16:42:20 -07:00
2026-07-10 17:27:47 -07:00
2026-09-06 00:28:38 -07:00
2026-08-05 00:51:33 -07:00
2026-06-22 16:42:20 -07:00
2026-07-17 17:18:36 -07:00
2026-07-29 00:47:18 -07:00
2026-08-24 00:01:53 -07:00
2026-07-13 14:17:49 -07:00
2026-06-23 00:23:34 -07:00
2026-09-05 16:31:11 -07:00
2026-09-06 14:34:03 -04:00
2026-08-06 20:07:55 -07:00
2026-07-22 00:22:36 -07:00
2026-08-31 16:45:36 -07:00
2026-08-31 16:45:36 -07:00
2026-08-31 16:45:36 -07:00
2026-08-31 16:45:36 -07:00
2026-08-31 16:45:36 -07:00
2026-08-31 16:45:36 -07:00
2026-08-31 16:45:36 -07:00
2026-06-19 17:14:55 -07:00
2026-08-01 03:26:30 -07:00
2026-07-10 17:27:47 -07:00
2026-08-19 14:58:00 -07:00
2026-08-03 22:48:22 -07:00
2026-08-03 22:48:22 -07:00
2026-06-23 00:23:34 -07:00
2026-07-20 03:04:28 -04:00
2026-09-06 21:17:00 -07:00
2026-07-05 21:51:32 -07:00
2026-07-05 21:51:32 -07:00
2026-06-12 16:31:24 -07:00
2026-07-16 12:38:31 -07:00
2026-09-06 19:27:12 -07:00
2026-06-22 16:42:20 -07:00
2026-07-13 21:30:10 -07:00
2026-07-20 18:54:44 -07:00
2026-09-06 01:53:16 -07:00
2026-09-06 02:26:00 -07:00
2026-08-03 01:00:58 -07:00
2026-09-06 05:24:54 -07:00
2026-08-30 11:45:21 -07:00
2026-09-12 19:56:46 -07:00
2026-05-15 23:52:37 -07:00
2026-06-07 17:49:01 -07:00
2026-08-17 23:28:38 -07:00
2026-06-29 22:38:29 -07:00
2026-09-06 02:14:42 -07:00
2026-08-29 22:37:05 -07:00
2026-08-22 11:00:01 -07:00
2026-09-05 23:50:30 -07:00
2026-08-09 20:25:15 -07:00
2026-08-09 21:39:24 -07:00
2026-08-19 22:39:48 -07:00
2026-09-15 01:24:30 -07:00
2026-08-30 11:45:21 -07:00
2026-08-24 10:12:38 -07:00
2026-09-06 18:20:49 -07:00
2026-08-19 22:39:48 -07:00
2026-07-13 16:15:44 -07:00
2026-07-22 15:52:42 -07:00
2026-07-31 16:15:20 -07:00
2026-06-29 22:38:29 -07:00
2026-06-18 00:11:32 -07:00
2026-09-05 22:03:19 -07:00
2026-08-13 22:48:24 -07:00
2026-09-11 20:25:49 -07:00
2026-08-17 23:28:38 -07:00
2026-09-07 19:45:54 -07:00