From 753f7386157153f091e61a2c0ff2146494d31b72 Mon Sep 17 00:00:00 2001 From: arteck <6681528+arteck@users.noreply.github.com> Date: Thu, 9 Jan 2025 06:14:04 +0100 Subject: [PATCH] upd --- .eslintignore | 2 -- eslint.config.cjs | 1 + lib/proxmox.js | 5 ----- package-lock.json | 8 ++++---- 4 files changed, 5 insertions(+), 11 deletions(-) delete mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 33659f2..0000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -**/.eslintrc.js -admin/words.js diff --git a/eslint.config.cjs b/eslint.config.cjs index 77624b3..4822267 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -49,6 +49,7 @@ module.exports = [ 'no-unsafe-finally': 'warn', 'no-cond-assign': 'warn', 'no-func-assign': 'warn', + 'no-useless-catch': 'warn', 'no-global-assign': 'warn', 'no-self-assign': 'warn', 'no-trailing-spaces': 'error', diff --git a/lib/proxmox.js b/lib/proxmox.js index 2e8c0aa..756ea76 100644 --- a/lib/proxmox.js +++ b/lib/proxmox.js @@ -238,17 +238,12 @@ class ProxmoxUtils { } async ticket() { - //try { const data = await this._getTicket(); this.adapter.log.debug(`Updating ticket to "${data.ticket}" and CSRF to "${data.CSRFPreventionToken}"`); TICKET = `PVEAuthCookie=${data.ticket}`; CSRF = data.CSRFPreventionToken; - - /* } catch (error) { - this.adapter.log.error(`Unable to update ticket: ${error.message || error}`); - }*/ } async _getData(url, method, data = null, retry = false, additional = null) { diff --git a/package-lock.json b/package-lock.json index 4afbf3d..064fb72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@types/sinon": "^17.0.3", "@types/sinon-chai": "^3.2.12", "chai": "^4.5.0", - "chai-as-promised": "^8.0.0", + "chai-as-promised": "^8.0.1", "eslint": "^9.17.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", @@ -2011,9 +2011,9 @@ } }, "node_modules/chai-as-promised": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-8.0.0.tgz", - "integrity": "sha512-sMsGXTrS3FunP/wbqh/KxM8Kj/aLPXQGkNtvE5wPfSToq8wkkvBpTZo1LIiEVmC4BwkKpag+l5h/20lBMk6nUg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-8.0.1.tgz", + "integrity": "sha512-OIEJtOL8xxJSH8JJWbIoRjybbzR52iFuDHuF8eb+nTPD6tgXLjRqsgnUGqQfFODxYvq5QdirT0pN9dZ0+Gz6rA==", "dev": true, "dependencies": { "check-error": "^2.0.0"