Skip to content

Commit de86b3b

Browse files
authored
docs: update no-promise-executor-return examples (#17529)
* docs: update `no-promise-executor-return` examples * docs: update example
1 parent 203a971 commit de86b3b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/src/rules/no-promise-executor-return.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Examples of **incorrect** code for this rule:
3838

3939
```js
4040
/*eslint no-promise-executor-return: "error"*/
41+
/*eslint-env es6*/
4142

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

7677
```js
7778
/*eslint no-promise-executor-return: "error"*/
79+
/*eslint-env es6*/
7880

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

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

127130
new Promise((resolve, reject) => {
128131
if (someCondition) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy