Addressing comments of #59:

- Removed "/Avoid magic literals" from the header to avoid noise.
- Added back unnamed constants and kept magic strings, magic numbers as a note at the end of the paragraph.
This commit is contained in:
Ioannis Brant-Ioannidis 2023-02-14 21:38:56 +04:00
parent 36d14bf048
commit d1e2cfb632

View file

@ -117,9 +117,9 @@ function getUser(): User;
**[ back to top](#table-of-contents)**
### Use searchable names / Avoid Magic Literals
### Use searchable names
We will read more code than we will ever write. It's important that the code we do write must be readable and searchable. By *not* naming variables that end up being meaningful for understanding our program, we hurt our readers. Make your names searchable. Tools like [ESLint](https://typescript-eslint.io/) can help identify magic literals.
We will read more code than we will ever write. It's important that the code we do write must be readable and searchable. By *not* naming variables that end up being meaningful for understanding our program, we hurt our readers. Make your names searchable. Tools like [ESLint](https://typescript-eslint.io/) can help identify unnamed constants (also known as magic strings and magic numbers).
**Bad:**