setup-better-typescript
Installation
SKILL.md
Set Up Better TypeScript
Set up @better-typescript/better-typescript in the package from which the linter will run.
Procedure
-
Detect npm or Bun from
packageManagerand the lockfile, then use that package manager so it updates the existing lockfile. -
Choose the setup package:
- In a single-package repository, use the repository root.
- In a monorepo, use the root when running there analyzes all intended code. Otherwise use each requested TypeScript workspace. Ask about scope only when it is unclear.
- The chosen directory must contain both
package.jsonandtsconfig.json, becausebetter-typescriptloads./tsconfig.jsonfrom its working directory.
-
Add the dev dependency in the chosen package:
npm
npm install --save-dev @better-typescript/better-typescript