From d1e2cfb632190e6990864ce64e81ce395b86b7d5 Mon Sep 17 00:00:00 2001 From: Ioannis Brant-Ioannidis Date: Tue, 14 Feb 2023 21:38:56 +0400 Subject: [PATCH] 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. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d438f64..9423570 100644 --- a/README.md +++ b/README.md @@ -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:**