add prefer-const to eslint rules,

remove empty block in dialog
This commit is contained in:
2026-05-21 22:00:52 +00:00
parent 545061b2eb
commit eb201de26b
2 changed files with 3 additions and 3 deletions
+2 -1
View File
@@ -23,6 +23,7 @@ export default defineConfig([js.configs.recommended,{
"argsIgnorePattern": "^_", "argsIgnorePattern": "^_",
"varsIgnorePattern": "^_", "varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_" "caughtErrorsIgnorePattern": "^_"
}] }],
"prefer-const": ["error"]
}, },
}]); }]);
+1 -2
View File
@@ -113,8 +113,7 @@ class ErrorDialog extends HTMLElement {
} }
this.dialog.addEventListener("close", () => { this.dialog.addEventListener("close", () => {
if (this.dialog.returnValue === "ok") {} if (this.dialog.returnValue === "copy") {
else if (this.dialog.returnValue === "copy") {
let errors = ""; let errors = "";
for (const error of this.errors.childNodes) { for (const error of this.errors.childNodes) {
errors += `${error.innerText}\n`; errors += `${error.innerText}\n`;