Skip to content

Commit

Permalink
docs(eslint-plugin): remove ignoreRHS from `no-unnecessary-conditio…
Browse files Browse the repository at this point in the history
…n` (#2052)
  • Loading branch information
0xCLARITY committed May 21, 2020
1 parent e9586c6 commit 23b4b66
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/eslint-plugin/docs/rules/no-unnecessary-condition.md
Expand Up @@ -64,14 +64,6 @@ function bar(arg?: string | null) {

Accepts an object with the following options:

- `ignoreRhs` (default `false`) - doesn't check if the right-hand side of `&&` and `||` is a necessary condition. For example, the following code is valid with this option on:

```ts
function head<T>(items: T[]) {
return items.length && items[0].toUpperCase();
}
```

- `allowConstantLoopConditions` (default `false`) - allows constant expressions in loops.

Example of correct code for when `allowConstantLoopConditions` is `true`:
Expand Down

0 comments on commit 23b4b66

Please sign in to comment.