|
@ -366,21 +366,21 @@ package.json |
|
|
package-lock.json |
|
|
package-lock.json |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
### 💩 Always name your boolean value 'flag' |
|
|
### 💩 Always name your boolean value a `flag` |
|
|
|
|
|
|
|
|
Leave the space for your colleagues to think what the boolean value means. |
|
|
Leave the space for your colleagues to think what the boolean value means. |
|
|
|
|
|
|
|
|
_Good 👍🏻_ |
|
|
_Good 👍🏻_ |
|
|
|
|
|
|
|
|
```javascript |
|
|
```javascript |
|
|
let flag = true |
|
|
let flag = true; |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
_Bad 👎🏻_ |
|
|
_Bad 👎🏻_ |
|
|
|
|
|
|
|
|
```javascript |
|
|
```javascript |
|
|
let isDone = false |
|
|
let isDone = false; |
|
|
let isEmpty = false |
|
|
let isEmpty = false; |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
### 💩 Long-read functions are better than short ones. |
|
|
### 💩 Long-read functions are better than short ones. |
|
|