TypeScript
20 rules in fabricahq/public-library
Annotate types at module boundaries and where they narrow
MEDIUMfabricahq/public-libraryAvoid silencing the type checker
HIGHfabricahq/public-library 1 starDeclare constants with as const, and satisfies when a type exists
MEDIUMfabricahq/public-libraryDefine every property of a domain type
MEDIUMfabricahq/public-libraryDistinguish null from undefined
LOWfabricahq/public-libraryFollow consistent naming conventions
LOWfabricahq/public-libraryGenerate service types from their contracts
HIGHfabricahq/public-libraryGive exported TypeScript interfaces and non-obvious functions doc comments stating their intent
MEDIUMfabricahq/public-libraryImport types with import type
MEDIUMfabricahq/public-libraryModel distinct states as discriminated unions
MEDIUMfabricahq/public-libraryNarrow unknown values before use
HIGHfabricahq/public-libraryPrefer literal unions over enums
MEDIUMfabricahq/public-libraryPrefer type aliases over interfaces
LOWfabricahq/public-libraryPreserve caller-owned data
MEDIUMfabricahq/public-libraryRequire caller-owned inputs and document defaults
MEDIUM-HIGHfabricahq/public-libraryUse Boolean() for explicit boolean coercion
LOWfabricahq/public-libraryUse named exports
LOWfabricahq/public-libraryUse one array type syntax
LOWfabricahq/public-libraryUse predictable file names
LOWfabricahq/public-libraryUse template literal types for patterned strings
LOW-MEDIUMfabricahq/public-library