From de86b3b2e58edd5826200c23255d8325abe375e1 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 6 Sep 2023 15:32:41 +0530 Subject: [PATCH] docs: update `no-promise-executor-return` examples (#17529) * docs: update `no-promise-executor-return` examples * docs: update example --- docs/src/rules/no-promise-executor-return.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/src/rules/no-promise-executor-return.md b/docs/src/rules/no-promise-executor-return.md index d82e4473477..f163d9ebf0b 100644 --- a/docs/src/rules/no-promise-executor-return.md +++ b/docs/src/rules/no-promise-executor-return.md @@ -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) { @@ -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) => { @@ -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) {