mirror of
https://github.com/labs42io/clean-code-typescript.git
synced 2024-11-23 05:34:04 +00:00
Adding terminology for magic literals (#59)
This commit is contained in:
parent
bae1b8dec0
commit
9e492d26a7
|
@ -119,7 +119,7 @@ function getUser(): User;
|
|||
|
||||
### 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 unnamed constants.
|
||||
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:**
|
||||
|
||||
|
|
Loading…
Reference in a new issue