File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const { getBaseConfig } = require('@openedx/frontend-build');
33
44const config = getBaseConfig ( 'eslint' ) ;
55
6+ config . globals = { globalThis : 'readonly' } ;
67config . rules = {
78 'import/no-extraneous-dependencies' : [ 'error' , {
89 devDependencies : [
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ export function getLocale(locale) {
167167 // Note that some browers prefer upper case for the region part of the locale, while others don't.
168168 // Thus the toLowerCase, for consistency.
169169 // https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language
170- return findSupportedLocale ( global . navigator . language . toLowerCase ( ) ) ;
170+ return findSupportedLocale ( globalThis . navigator . language . toLowerCase ( ) ) ;
171171}
172172
173173/**
@@ -199,9 +199,9 @@ export function isRtl(locale) {
199199 */
200200export function handleRtl ( ) {
201201 if ( isRtl ( getLocale ( ) ) ) {
202- global . document . getElementsByTagName ( 'html' ) [ 0 ] . setAttribute ( 'dir' , 'rtl' ) ;
202+ globalThis . document . getElementsByTagName ( 'html' ) [ 0 ] . setAttribute ( 'dir' , 'rtl' ) ;
203203 } else {
204- global . document . getElementsByTagName ( 'html' ) [ 0 ] . setAttribute ( 'dir' , 'ltr' ) ;
204+ globalThis . document . getElementsByTagName ( 'html' ) [ 0 ] . setAttribute ( 'dir' , 'ltr' ) ;
205205 }
206206}
207207
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ export async function initError(error) {
140140 */
141141export async function auth ( requireUser , hydrateUser ) {
142142 if ( requireUser ) {
143- await ensureAuthenticatedUser ( global . location . href ) ;
143+ await ensureAuthenticatedUser ( globalThis . location . href ) ;
144144 } else {
145145 await fetchAuthenticatedUser ( ) ;
146146 }
You can’t perform that action at this time.
0 commit comments