Skip to content

Commit 1fc4cd2

Browse files
authored
Apply suggestion from @edelauna
1 parent 53573fe commit 1fc4cd2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ When writing new code:
2323
New or substantially changed test files must not add `@typescript-eslint/no-explicit-any` suppression entries to `src/eslint-suppressions.json`:
2424

2525
- Prefer typed structural doubles: type mock context/proxy classes against the real public types they stand in for (e.g. `vscode.ExtensionContext`), and use `unknown` for storage values and mock callback parameters instead of `any`.
26-
- Access private members with bracket notation (`provider["viewLocalState"]`) and call public members without casts so their generic signatures keep checking arguments.
26+
- Access private members with bracket notation (`provider["view"]`) and call public members without casts so their generic signatures keep checking arguments.
2727
- When a partial double cannot be assigned to the real type, cast it once at the construction site (`as unknown as T`) with a comment naming the members the double provides; do not repeat `as any` at every use site.
2828
- Validate with `pnpm --dir src run check-types`, the narrowest affected Vitest suite, and `pnpm --dir src exec eslint --prune-suppressions --max-warnings=0 <relative-test-file>`; the run must not add a new entry or raise an existing count.
2929
- An exception requires a comment next to the cast explaining why no typed alternative exists and maintainer approval in review.

0 commit comments

Comments
 (0)