Skip to content

Commit de86b3b

Browse files
authoredSep 6, 2023
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

+3
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)
Please sign in to comment.