Remove the code style rule about casts to bool

rav/nuke_implicit_bools_rule
Richard van der Hoff 2023-09-22 10:11:18 +01:00
parent 29bd206f85
commit 67401eeb27
1 changed files with 0 additions and 11 deletions

View File

@ -113,17 +113,6 @@ Unless otherwise specified, the following applies to all code:
}
```
14. Explicitly cast to a boolean, rather than relying on implicit truthiness of non-boolean values:
```typescript
const isRealUser = !!userId && ...;
// ... or ...
const isRealUser = Boolean(userId) && ...;
// but *not*:
const isRealUser = userId && ...; // invalid implicit cast
```
15. Use `switch` statements when checking against more than a few enum-like values.
16. Use `const` for constants, `let` for mutability.
17. Describe types exhaustively (ensure noImplictAny would pass).