Skip to content

Commit

Permalink
docs: add missing backticks to no-else-return (eslint#19309)
Browse files Browse the repository at this point in the history
  • Loading branch information
lumirlumir authored Jan 4, 2025
1 parent df409d8 commit 1610c9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/rules/no-else-return.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ function foo() {

## Rule Details

This rule is aimed at highlighting an unnecessary block of code following an `if` containing a return statement. As such, it will warn when it encounters an `else` following a chain of `if`s, all of them containing a `return` statement.
This rule is aimed at highlighting an unnecessary block of code following an `if` containing a `return` statement. As such, it will warn when it encounters an `else` following a chain of `if`s, all of them containing a `return` statement.

## Options

This rule has an object option:

* `allowElseIf: true` (default) allows `else if` blocks after a return
* `allowElseIf: false` disallows `else if` blocks after a return
* `allowElseIf: true` (default) allows `else if` blocks after a `return`
* `allowElseIf: false` disallows `else if` blocks after a `return`

### allowElseIf: true

Expand Down

0 comments on commit 1610c9e

Please sign in to comment.