|
1 |
| -# typescript-clean-code |
2 |
| -typescript-clean-code |
| 1 | +# clean-code-typescript |
| 2 | + |
| 3 | +Clean Code concepts adapted for TypeScript. |
| 4 | +Inspired from [clean-code-javascript](https://github.com/ryanmcdermott/clean-code-javascript) |
| 5 | + |
| 6 | +## Table of Contents |
| 7 | + 1. [Introduction](#introduction) |
| 8 | + 2. [Variables](#variables) |
| 9 | + 3. [Functions](#functions) |
| 10 | + 4. [Objects and Data Structures](#objects-and-data-structures) |
| 11 | + 5. [Classes](#classes) |
| 12 | + 6. [SOLID](#solid) |
| 13 | + 7. [Testing](#testing) |
| 14 | + 8. [Concurrency](#concurrency) |
| 15 | + 9. [Error Handling](#error-handling) |
| 16 | + 10. [Formatting](#formatting) |
| 17 | + 11. [Comments](#comments) |
| 18 | + 12. [Translation](#translation) |
| 19 | + |
| 20 | +## Introduction |
| 21 | + |
| 23 | + |
| 24 | +Software engineering principles, from Robert C. Martin's book |
| 25 | +[*Clean Code*](https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882), |
| 26 | +adapted for TypeScript. This is not a style guide. It's a guide to producing |
| 27 | +[readable, reusable, and refactorable](https://github.com/ryanmcdermott/3rs-of-software-architecture) software in TypeScript. |
| 28 | + |
| 29 | +Not every principle herein has to be strictly followed, and even fewer will be |
| 30 | +universally agreed upon. These are guidelines and nothing more, but they are |
| 31 | +ones codified over many years of collective experience by the authors of |
| 32 | +*Clean Code*. |
| 33 | + |
| 34 | +Our craft of software engineering is just a bit over 50 years old, and we are |
| 35 | +still learning a lot. When software architecture is as old as architecture |
| 36 | +itself, maybe then we will have harder rules to follow. For now, let these |
| 37 | +guidelines serve as a touchstone by which to assess the quality of the |
| 38 | +JavaScript code that you and your team produce. |
| 39 | + |
| 40 | +One more thing: knowing these won't immediately make you a better software |
| 41 | +developer, and working with them for many years doesn't mean you won't make |
| 42 | +mistakes. Every piece of code starts as a first draft, like wet clay getting |
| 43 | +shaped into its final form. Finally, we chisel away the imperfections when |
| 44 | +we review it with our peers. Don't beat yourself up for first drafts that need |
| 45 | +improvement. Beat up the code instead! |
| 46 | + |
| 47 | +**[⬆ back to top](#table-of-contents)** |
0 commit comments