Skip to content

Commit

Permalink
docs(eslint-plugin): [no-unnecessary-boolean-literal-compare] fix fix…
Browse files Browse the repository at this point in the history
…er docs (#3397)
  • Loading branch information
rmobis committed May 18, 2021
1 parent e8ce2bf commit 6291f38
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -124,10 +124,10 @@ if (!(someNullCondition ?? true)) {

| Comparison | Fixer Output | Notes |
| :----------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- |
| `booleanVar === true` | `booleanLiteral` | |
| `booleanVar !== true` | `!booleanLiteral` | |
| `booleanVar === false` | `!booleanLiteral` | |
| `booleanVar !== false` | `booleanLiteral` | |
| `booleanVar === true` | `booleanVar` | |
| `booleanVar !== true` | `!booleanVar` | |
| `booleanVar === false` | `!booleanVar` | |
| `booleanVar !== false` | `booleanVar` | |
| `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
| `nullableBooleanVar === false` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
Expand Down

0 comments on commit 6291f38

Please sign in to comment.