Skip to content

PhilipafraneHMCTS/fqe-code-quality-workshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FQE Code Quality Workshop

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.

Contents

  • 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.

Categories

The workshop is organized into three categories:

  • maintainability
  • readability
  • scalability

Each category contains exercises at these difficulty levels:

  • easy
  • medium
  • hard

Setup

Install dependencies before running tasks:

npm install

Run a Task

Use the npm test script with the category and difficulty:

npm run test <category> <difficulty>

Example:

npm run test maintainability easy

Valid categories:

  • maintainability
  • readability
  • scalability

Valid difficulty values:

  • easy
  • medium
  • hard

Unlock Solutions

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 medium

You will be prompted for a decryption password.

Note: The decrypted file will be written alongside the encrypted file with the .ts extension and the .ts.enc file will be removed on success.

Notes

  • Task execution uses npx tsx to 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.

License

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.

About

Practical code quality workshop focused on maintainability, reliability, and scalability

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 75.8%
  • JavaScript 24.2%