Skip to content

Commit dfef58e

Browse files
committed
docs: update docs
1 parent 67ce653 commit dfef58e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/rules/always-return.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ chain does not warn if it does an assignment to a global variable. Default is
101101
`["window"]`.
102102

103103
```js
104-
/* eslint promise/always-return: ["error", { ignoreAssignmentVariable: ["window", "globalThis", "globalThis.modules"] }] */
104+
/* eslint promise/always-return: ["error", { ignoreAssignmentVariable: ["window", "globalThis"] }] */
105105

106106
// OK
107107
promise.then((x) => {
@@ -110,17 +110,17 @@ promise.then((x) => {
110110

111111
// OK
112112
promise.then((x) => {
113-
globalThis.x = x
113+
window.x.y = x
114114
})
115115

116116
// OK
117117
promise.then((x) => {
118-
globalThis.modules.x = x
118+
globalThis.x = x
119119
})
120120

121-
// NG
121+
// OK
122122
promise.then((x) => {
123-
window.x.y = x
123+
globalThis.modules.x = x
124124
})
125125

126126
// NG

0 commit comments

Comments
 (0)