typescript-style
Installation
SKILL.md
TypeScript style – DataSync Asset Store Filesystem
When to use
- Editing
tsconfig.json,tslint.json, or files undertypings/ - Adding or changing
.tsundersrc/and need to align with existing strictness and lint - Debugging compile errors vs published types
Instructions
- Compiler:
tsconfig.jsoncompiles onlysrc/**/*todist/(moduleCommonJS,targetES6,moduleResolutionnode,alwaysStrict,noUnusedLocals/noUnusedParameters,noImplicitReturns, etc.). Do not widen options without a deliberate reason—match existing patterns. - Declarations: Public types ship from
typings/(package.jsonhas"types": "./typings"). Keep.d.tsin sync withsrc/exports; the build does not emit declarations fromtsc(declaration options are commented out in tsconfig). - Lint:
npm run tslintusestslint.jsonextendingtslint:recommendedonsrc/**/*.ts. Notable rules include max line length 120, 2-space indent,no-default-export, interface names prefixed withIwhere the rule applies—follow fixes consistent with nearby files. - Dependencies:
@types/nodeand@types/jestversions inpackage.jsonare pinned for compatibility; bump types together with TS upgrades when needed.