Skip to content

Commit

Permalink
docs: update no-promise-executor-return examples (#17529)
Browse files Browse the repository at this point in the history
* docs: update `no-promise-executor-return` examples

* docs: update example
  • Loading branch information
snitin315 committed Sep 6, 2023
1 parent 203a971 commit de86b3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/src/rules/no-promise-executor-return.md
Expand Up @@ -38,6 +38,7 @@ Examples of **incorrect** code for this rule:

```js
/*eslint no-promise-executor-return: "error"*/
/*eslint-env es6*/

new Promise((resolve, reject) => {
if (someCondition) {
Expand Down Expand Up @@ -75,6 +76,7 @@ Examples of **correct** code for this rule:

```js
/*eslint no-promise-executor-return: "error"*/
/*eslint-env es6*/

// Turn return inline into two lines
new Promise((resolve, reject) => {
Expand Down Expand Up @@ -123,6 +125,7 @@ Examples of **correct** code for this rule with the `{ "allowVoid": true }` opti

```js
/*eslint no-promise-executor-return: ["error", { allowVoid: true }]*/
/*eslint-env es6*/

new Promise((resolve, reject) => {
if (someCondition) {
Expand Down

0 comments on commit de86b3b

Please sign in to comment.