@rulepack/typescript

v0.1.0

Strict TypeScript baseline: no any, narrowing on unknown, exhaustive switches, no enums.

Updated 6/4/20265 files | 3.9 KB
$pnpm dlx rulepack add typescript

Drops CLAUDE.md / .cursor/rules/* and friends into your project.

Downloads

0

Stars

0

Views

1

typescript

Strict TypeScript baseline: no any, narrowing on unknown, exhaustive switches, no enums.

npx rulepack add typescript

What it covers

  • A strict tsconfig baseline kept on: strict, noUncheckedIndexedAccess, noImplicitOverride, noFallthroughCasesInSwitch, noUnusedLocals / noUnusedParameters, verbatimModuleSyntax
  • Type discipline: never any (type as unknown and narrow), union literals over enums, satisfies for conformance, as only as a last resort with a comment
  • Patterns: discriminated unions for state machines, Result<T, E>-style returns over throwing for expected failures, branded types for IDs
  • Module shape: types exported alongside their values, import type { … } for type-only imports, explicit export surface instead of catch-all barrels

Source

Rules align with the official TypeScript handbook & tsconfig reference: https://www.typescriptlang.org/tsconfig

License

MIT