fix: remove unused variables in main.js

- Remove unused tooltipList and popoverList variables
- Remove unused event parameters in change/click handlers
- All oxlint checks now pass (4 warnings -> 0)
This commit is contained in:
2025-11-05 15:03:00 +01:00
parent fdcec7eb84
commit 8ca7ad14d5
3 changed files with 51 additions and 7 deletions

View File

@@ -9,13 +9,13 @@
document.addEventListener("DOMContentLoaded", function () {
// Initialize tooltips
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
// Initialize popovers
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
popoverTriggerList.map(function (popoverTriggerEl) {
return new bootstrap.Popover(popoverTriggerEl);
});
@@ -75,7 +75,7 @@ document.addEventListener("DOMContentLoaded", function () {
// File input customization
const fileInputs = document.querySelectorAll(".custom-file-input");
fileInputs.forEach(function (input) {
input.addEventListener("change", function (e) {
input.addEventListener("change", function () {
const fileName = this.files[0]?.name || "Choose file";
const nextSibling = this.nextElementSibling;
if (nextSibling) {
@@ -136,7 +136,7 @@ document.addEventListener("DOMContentLoaded", function () {
const exportLinks = document.querySelectorAll("[data-export]");
exportLinks.forEach(function (link) {
link.addEventListener("click", function (e) {
link.addEventListener("click", function () {
// Handle export functionality if needed
console.log("Export requested:", this.dataset.export);
});