SKILL.md
Format code with pnpm
Use this skill any time formatting is required in the TypeSpec repo. Do not assume formatting happens automatically; always run pnpm format following this guidance.
Preconditions
- Command must run from the repository root (where
package.jsonandpnpm-workspace.yamllive). - Dependencies must be installed.
Steps
- Confirm you are at the repo root.
- If
node_modulesare missing orpnpmcomplains about missing packages, run:
``bash pnpm install ``
- Run the formatter:
``bash pnpm format ``
- If the command fails with
ERRPNPMNOIMPORTERMANIFEST_FOUND, you are not at the repo root.cdto the root and retry. - If
pnpm formatexits with a non-zero code but prints a list of changed files, re-runpnpm formatonce to ensure a clean exit.
Notes
- Do not cancel the command; formatting may take about a minute.