You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/use/migrate-to-10.0.0.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ The lists below are ordered roughly by the number of users each change is expect
16
16
### Breaking changes for users
17
17
18
18
-[Node.js < v20.19, v21, v23 are no longer supported](#drop-old-node)
19
+
-[`no-shadow-restricted-names` now reports `globalThis` by default](#no-shadow-restricted-names)
19
20
20
21
### Breaking changes for plugin developers
21
22
@@ -38,3 +39,22 @@ ESLint is officially dropping support for these versions of Node.js starting wit
38
39
**To address:** Make sure you upgrade to at least Node.js v20.19.0 when using ESLint v10. One important thing to double check is the Node.js version supported by your editor when using ESLint via editor integrations. If you are unable to upgrade, we recommend continuing to use ESLint v9 until you are able to upgrade Node.js.
## <aname="no-shadow-restricted-names"></a> `no-shadow-restricted-names` now reports `globalThis` by default
44
+
45
+
In ESLint v10, the [`no-shadow-restricted-names`](../rules/no-shadow-restricted-names) rule now treats `globalThis` as a restricted name by default. Consequently, the `reportGlobalThis` option now defaults to `true` (previously `false`). As a result, declarations such as `const globalThis = "foo";` or `function globalThis() {}` will now be reported by default.
46
+
47
+
**To address:**
48
+
49
+
- Rename local identifiers named `globalThis` to avoid shadowing the global.
50
+
- Or restore the previous behavior by configuring the rule explicitly:
0 commit comments