From dbc880fe35ac3313368f7466935716701ab9bd02 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 5 Jan 2026 11:08:21 +0100 Subject: [PATCH] Add warning about running tsc with file arguments (#28797) Co-authored-by: Claude Opus 4.5 --- .github/copilot-instructions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 06078f3004..df08cb58ae 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -22,11 +22,13 @@ You are an assistant helping with development of the Home Assistant frontend. Th ```bash yarn lint # ESLint + Prettier + TypeScript + Lit yarn format # Auto-fix ESLint + Prettier -yarn lint:types # TypeScript compiler +yarn lint:types # TypeScript compiler (run WITHOUT file arguments) yarn test # Vitest script/develop # Development server ``` +> **WARNING:** Never run `tsc` or `yarn lint:types` with file arguments (e.g., `yarn lint:types src/file.ts`). When `tsc` receives file arguments, it ignores `tsconfig.json` and emits `.js` files into `src/`, polluting the codebase. Always run `yarn lint:types` without arguments. For individual file type checking, rely on IDE diagnostics. If `.js` files are accidentally generated, clean up with `git clean -fd src/`. + ### Component Prefixes - `ha-` - Home Assistant components