fix: A27 lint terminé — eslint 0/0 (285 warnings nettoyés) (v7.25.0)
FlowDeck CI / test (push) Failing after 3h9m51s
FlowDeck CI / lint (push) Successful in 1m54s
FlowDeck CI / docker (push) Skipped

3 familles, 13 fichiers (+153/−167) :

1. no-empty ×70 = TOUS des `catch (x) {}` vides → `catch { /* volontaire */ }`
   (binding optionnel ES2019 + commentaire : passe no-empty ET
   no-unused-vars, zéro changement de comportement).

2. no-unused-vars ×171 :
   - bindings de catch inutilisés retirés (e/err/ex/e2/e3)
   - 24 lignes mortes déterministes, chaque suppression validée par assert
     sur le texte exact (`var self = this` ×8, `var lang`, `var acc`,
     `var today`, `var path/restored/files/resolved/items/clickEl`,
     `uid()`/`propName()` sans un seul appel, `.then` + `resolved++`
     compteurs jamais lus)
   - `/* exported */` sur les 10 fonctions appelées depuis les attributs
     HTML des templates (vérifiées par grep : 1 template chacune) :
     setActiveTab/kanbanBoard/filterSystem/sortSystem/newIssueForm/
     showNewIssue, importWizard, libraryPage, workspacesPage, settingsInit

3. no-undef ×44 = vrais globaux déclarés dans eslint.config.mjs
   (getSvgIcon = script inline de base.html, TextDecoder = API navigateur,
   Prism = CDN) + 2 vrais correctifs :
   - settings.js : `typeof toast === 'function'` = guard TOUJOURS faux
     (pas de toast global) → les toasts timezone/SAML ne s'affichaient
     jamais → `window.showToast` (2 sites)
   - local_workspace.js : `_wsInitData = window._wsInitData`
     (auto-affectation sans effet, global implicite) supprimé

eslint static/js : **0 erreur / 0 warning** (285 → 0) · node --check vert
sur tous les fichiers · suite **1089/1089** · ruff OK · docs à jour
This commit is contained in:
2026-10-01 21:30:37 -04:00
parent 103bc57418
commit 8d0d69e7b8
19 changed files with 189 additions and 173 deletions
+9 -9
View File
@@ -63,7 +63,7 @@ document.addEventListener('alpine:init', () => {
var d = await r.json();
this.treeItems = d.tree || [];
this._sortTree();
} catch(e) { this.treeItems = []; this.sortedTreeItems = []; }
} catch { this.treeItems = []; this.sortedTreeItems = []; }
finally { this.treeLoading = false; }
},
@@ -267,7 +267,7 @@ document.addEventListener('alpine:init', () => {
ul.appendChild(li);
});
el.appendChild(ul);
} catch(e) {}
} catch { /* volontaire */ }
},
async openFile(path, sha) {
@@ -286,7 +286,7 @@ document.addEventListener('alpine:init', () => {
} else {
this.fileContent = '[Error loading file]';
}
} catch(e) {
} catch {
this.fileContent = '[Error loading file]';
}
this.fileLoading = false;
@@ -343,7 +343,7 @@ document.addEventListener('alpine:init', () => {
var d = await r.json();
window.showToast('Failed to save: ' + (d.error || 'Unknown error'), 'error');
}
} catch(e) { window.showToast('Network error', 'error'); }
} catch { window.showToast('Network error', 'error'); }
},
async deleteCurrentFile() {
@@ -358,7 +358,7 @@ document.addEventListener('alpine:init', () => {
this.filePath = '';
await this.refreshTree();
}
} catch(e) {}
} catch { /* volontaire */ }
},
async refreshTree() {
@@ -380,7 +380,7 @@ document.addEventListener('alpine:init', () => {
try {
var r = await fetch('/api/gitea/projects/' + this.owner + '/' + this.repo + '/private-pages');
if (r.ok) { var d = await r.json(); this.privatePages = d.pages || []; }
} catch(e) {}
} catch { /* volontaire */ }
},
newPrivate() {
@@ -398,7 +398,7 @@ document.addEventListener('alpine:init', () => {
this.editingPrivateTitle = d.page.title;
this.editingPrivateContent = d.page.content;
}
} catch(e) {}
} catch { /* volontaire */ }
},
async savePrivate() {
@@ -419,7 +419,7 @@ document.addEventListener('alpine:init', () => {
this.editingPrivateContent = '';
await this.loadPrivatePages();
}
} catch(e) {}
} catch { /* volontaire */ }
},
// Create new file
@@ -477,7 +477,7 @@ document.addEventListener('alpine:init', () => {
method: 'DELETE', headers: {'X-CSRF-Token': this.getCsrfToken ? this.getCsrfToken() : ''}
});
if (r.ok) await this.loadPrivatePages();
} catch(e) {}
} catch { /* volontaire */ }
},
getCsrfToken() {