Skip to content

Commit bfa3eb3

Browse files
Merge pull request ryanmcdermott#98 from danielstjules/magic-numbers
Mention tools for identifying magic numbers
2 parents 907617b + 63b46b5 commit bfa3eb3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ getUser();
7272
We will read more code than we will ever write. It's important that the code we
7373
do write is readable and searchable. By *not* naming variables that end up
7474
being meaningful for understanding our program, we hurt our readers.
75-
Make your names searchable.
75+
Make your names searchable. Tools like
76+
[buddy.js](https://github.com/danielstjules/buddy.js) and
77+
[ESLint](https://github.com/eslint/eslint/blob/660e0918933e6e7fede26bc675a0763a6b357c94/docs/rules/no-magic-numbers.md)
78+
can help identify unnamed constants.
7679

7780
**Bad:**
7881
```javascript
@@ -367,7 +370,7 @@ for it and it's quite possibly the worst sin you can commit as a professional
367370
developer. Duplicate code means there's more than one place to alter something
368371
if you need to change some logic. JavaScript is untyped, so it makes having
369372
generic functions quite easy. Take advantage of that! Tools like
370-
[jsinpect](https://github.com/danielstjules/jsinspect) can help you find duplicate
373+
[jsinspect](https://github.com/danielstjules/jsinspect) can help you find duplicate
371374
code eligible for refactoring.
372375

373376
**Bad:**

0 commit comments

Comments
 (0)