This repository contains a TypeScript-based code quality workshop with task exercises grouped by category and difficulty. It includes runnable task files, encrypted solution files, and helper scripts to execute tasks and unlock solutions.
tasks/- Workshop exercises in plain TypeScript.solutions/- Encrypted reference solutions for each exercise.scripts/run-category.js- Runs a selected task, run via an npm script.scripts/decrypt.js- Unlocks an encrypted solution file, run via an npm script.package.json- Defines dependencies and task scripts.tsconfig.json- TypeScript configuration for running tasks.
The workshop is organized into three categories:
maintainabilityreadabilityscalability
Each category contains exercises at these difficulty levels:
easymediumhard
Install dependencies before running tasks:
npm installUse the npm test script with the category and difficulty:
npm run test <category> <difficulty>Example:
npm run test maintainability easyValid categories:
maintainabilityreadabilityscalability
Valid difficulty values:
easymediumhard
Encrypted solution files are stored in solutions/ with the .ts.enc extension. To decrypt a solution, run:
npm run unlock-solution <category> <difficulty>Example:
npm run unlock-solution readability mediumYou will be prompted for a decryption password.
Note: The decrypted file will be written alongside the encrypted file with the
.tsextension and the.ts.encfile will be removed on success.
- Task execution uses
npx tsxto run TypeScript directly without a separate build step. - If a category or difficulty is invalid, the scripts will print usage guidance and exit.
- Keep the encrypted
solutions/files safe, as they contain the workshop answers.
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.