From cdbe967902c35db2f45446774b52c15ff8bb90b8 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sun, 3 Sep 2023 16:00:29 +0530 Subject: [PATCH 1/2] docs: update `no-promise-executor-return` examples --- docs/src/rules/no-promise-executor-return.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/rules/no-promise-executor-return.md b/docs/src/rules/no-promise-executor-return.md index d82e44734771..a6293a657e28 100644 --- a/docs/src/rules/no-promise-executor-return.md +++ b/docs/src/rules/no-promise-executor-return.md @@ -75,6 +75,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 +124,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) { From 57dcb6c84eb4de5d65f4ef84094abc9581f04ba4 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 5 Sep 2023 07:04:56 +0530 Subject: [PATCH 2/2] docs: update example --- docs/src/rules/no-promise-executor-return.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/rules/no-promise-executor-return.md b/docs/src/rules/no-promise-executor-return.md index a6293a657e28..f163d9ebf0b4 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) {