Skip to content

Commit 0875458

Browse files
author
Marek Zeman
committed
Lint fixes
1 parent b3ad871 commit 0875458

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

misc/dist/html/editor.html

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read
151151
</div>
152152
</div>
153153
<script>
154-
const byId = sel => document.getElementById(sel);
154+
function byId(sel) {
155+
return document.getElementById(sel);
156+
}
157+
155158
window.addEventListener('load', () => {
156159
function notifyUpdate(sw) {
157160
const btn = byId('btn-tab-update');
@@ -167,7 +170,7 @@ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read
167170
}
168171
if ('serviceWorker' in navigator) {
169172
navigator.serviceWorker.register('service.worker.js').then(
170-
reg => {
173+
(reg) => {
171174
if (reg.waiting) {
172175
notifyUpdate(reg.waiting);
173176
}
@@ -220,9 +223,7 @@ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read
220223
localStorage.setItem('welcomeModalDismissed', 'true');
221224
}
222225
}
223-
</script>
224-
<script src="redot.editor.js"></script>
225-
<script>
226+
226227
let editor = null;
227228
let game = null;
228229
let setStatusMode;
@@ -234,8 +235,8 @@ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read
234235
return new Promise((resolve, reject) => {
235236
const req = indexedDB.deleteDatabase(path);
236237
req.onsuccess = () => resolve();
237-
req.onerror = err => reject(err);
238-
req.onblocked = err => reject(err);
238+
req.onerror = (err) => reject(err);
239+
req.onblocked = (err) => reject(err);
239240
});
240241
}
241242
if (!window.confirm('Are you sure you want to delete all the locally stored files?\nClicking "OK" will permanently remove your projects and editor settings!')) {
@@ -262,11 +263,11 @@ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read
262263
byId('tab-game'),
263264
];
264265
function showTab(name) {
265-
tabsLink.forEach(elem => {
266+
tabsLink.forEach((elem) => {
266267
elem.parentElement.classList.toggle('active', elem.id === `btn-tab-${name}`);
267268
});
268269

269-
tabsContent.forEach(elem => {
270+
tabsContent.forEach((elem) => {
270271
if (elem.id === `tab-${name}`) {
271272
elem.style.display = '';
272273

@@ -372,14 +373,14 @@ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read
372373
}
373374
}
374375

375-
setStatusMode = mode => {
376+
setStatusMode = (mode) => {
376377
if (statusMode === mode || !initializing) {
377378
return;
378379
}
379380
[statusProgress, statusIndeterminate, statusNotice].forEach((elem) => {
380381
elem.style.display = 'none';
381382
});
382-
animationCallbacks = animationCallbacks.filter(value => (value !== animateStatusIndeterminate));
383+
animationCallbacks = animationCallbacks.filter((value) => (value !== animateStatusIndeterminate));
383384
switch (mode) {
384385
case 'progress':
385386
statusProgress.style.display = 'block';
@@ -428,8 +429,8 @@ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read
428429
setLoaderEnabled(true);
429430
};
430431
function Execute(args) {
431-
const is_editor = args.filter(v => v === '--editor' || v === '-e').length !== 0;
432-
const is_project_manager = args.filter(v => v === '--project-manager').length !== 0;
432+
const is_editor = args.filter((v) => v === '--editor' || v === '-e').length !== 0;
433+
const is_project_manager = args.filter((v) => v === '--project-manager').length !== 0;
433434
const is_game = !is_editor && !is_project_manager;
434435
if (video_driver) {
435436
args.push('--rendering-driver', video_driver);
@@ -539,17 +540,19 @@ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read
539540
}
540541
}
541542

542-
async function preloadZip(target) {
543+
function preloadZip(target) {
543544
if (target.files.length > 0) {
544545
return target.files[0].arrayBuffer();
545546
}
547+
return Promise.resolve(null);
546548
}
547549

548550
byId('startButton').onclick = () => {
549-
preloadZip(byId('zip-file')).then(zip => {
551+
preloadZip(byId('zip-file')).then((zip) => {
550552
startEditor(zip);
551553
});
552554
};
553555
</script>
556+
<script src="redot.editor.js"></script>
554557
</body>
555558
</html>

misc/dist/html/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ self.addEventListener('message', (event) => {
154154
if (msg === 'claim') {
155155
self.skipWaiting().then(() => self.clients.claim());
156156
} else if (msg === 'clear') {
157-
void caches.delete(CACHE_NAME);
157+
caches.delete(CACHE_NAME);
158158
} else if (msg === 'update') {
159159
self.skipWaiting().then(() => self.clients.claim()).then(() => self.clients.matchAll()).then((all) => all.forEach((c) => c.navigate(c.url)));
160160
}

platform/web/js/libs/library_godot_input.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ const GodotIME = {
4747

4848
ime_active: function (active) {
4949
function focus_timer() {
50-
if (!GodotIME.ime) return;
50+
if (!GodotIME.ime) {
51+
return;
52+
}
5153
GodotIME.active = true;
5254
GodotIME.ime.focus();
5355
}

0 commit comments

Comments
 (0)