From: Jérôme Benoit Date: Thu, 28 Dec 2023 13:55:26 +0000 (+0100) Subject: build: temporary silence linter errors X-Git-Tag: v1.2.31~23 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8fc5fda4d9800028784b8630ac3c6535a57514ef;p=e-mobility-charging-stations-simulator.git build: temporary silence linter errors Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/SharedLRUCache.ts b/src/charging-station/SharedLRUCache.ts index a06c8452..b2dacec8 100644 --- a/src/charging-station/SharedLRUCache.ts +++ b/src/charging-station/SharedLRUCache.ts @@ -1,4 +1,4 @@ -import LRUCache from 'mnemonist/lru-map-with-delete.js'; +import { LRUMapWithDelete as LRUCache } from 'mnemonist'; import { Bootstrap } from './Bootstrap.js'; import type { ChargingStationConfiguration, ChargingStationTemplate } from '../types/index.js'; diff --git a/src/charging-station/ocpp/OCPPIncomingRequestService.ts b/src/charging-station/ocpp/OCPPIncomingRequestService.ts index 06a80e3a..9666f3d7 100644 --- a/src/charging-station/ocpp/OCPPIncomingRequestService.ts +++ b/src/charging-station/ocpp/OCPPIncomingRequestService.ts @@ -25,6 +25,7 @@ export abstract class OCPPIncomingRequestService { protected constructor(version: OCPPVersion) { this.version = version; + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment this.ajv = new Ajv({ keywords: ['javaType'], multipleOfPrecision: 2, @@ -117,6 +118,7 @@ export abstract class OCPPIncomingRequestService { schema: JSONSchemaType, ) { if (this.jsonValidateFunctions.has(commandName) === false) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access this.jsonValidateFunctions.set(commandName, this.ajv.compile(schema).bind(this)); } return this.jsonValidateFunctions.get(commandName)!; diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index aeb09c33..c772fec1 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -49,6 +49,7 @@ export abstract class OCPPRequestService { protected constructor(version: OCPPVersion, ocppResponseService: OCPPResponseService) { this.version = version; + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment this.ajv = new Ajv({ keywords: ['javaType'], multipleOfPrecision: 2, @@ -233,6 +234,7 @@ export abstract class OCPPRequestService { if (this.jsonValidateFunctions.has(commandName) === false) { this.jsonValidateFunctions.set( commandName, + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access this.ajv.compile(this.jsonSchemas.get(commandName)!).bind(this), ); } @@ -287,8 +289,11 @@ export abstract class OCPPRequestService { ) { this.ocppResponseService.jsonIncomingRequestResponseValidateFunctions.set( commandName, + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call this.ajv + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access .compile(this.ocppResponseService.jsonIncomingRequestResponseSchemas.get(commandName)!) + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access .bind(this), ); } diff --git a/src/charging-station/ocpp/OCPPResponseService.ts b/src/charging-station/ocpp/OCPPResponseService.ts index 9fcfd6ef..e386e432 100644 --- a/src/charging-station/ocpp/OCPPResponseService.ts +++ b/src/charging-station/ocpp/OCPPResponseService.ts @@ -33,6 +33,7 @@ export abstract class OCPPResponseService { protected constructor(version: OCPPVersion) { this.version = version; + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment this.ajv = new Ajv({ keywords: ['javaType'], multipleOfPrecision: 2, @@ -101,6 +102,7 @@ export abstract class OCPPResponseService { schema: JSONSchemaType, ) { if (this.jsonRequestValidateFunctions.has(commandName) === false) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access this.jsonRequestValidateFunctions.set(commandName, this.ajv.compile(schema).bind(this)); } return this.jsonRequestValidateFunctions.get(commandName)!; diff --git a/src/utils/AsyncLock.ts b/src/utils/AsyncLock.ts index ec14a193..3f89759d 100644 --- a/src/utils/AsyncLock.ts +++ b/src/utils/AsyncLock.ts @@ -1,6 +1,6 @@ // Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved. -import Queue from 'mnemonist/queue.js'; +import { Queue } from 'mnemonist'; import { Constants } from './Constants.js'; diff --git a/ui/web/pnpm-lock.yaml b/ui/web/pnpm-lock.yaml index f0ac18e9..227c01be 100644 --- a/ui/web/pnpm-lock.yaml +++ b/ui/web/pnpm-lock.yaml @@ -1467,7 +1467,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001571 + caniuse-lite: 1.0.30001572 electron-to-chromium: 1.4.616 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.2) @@ -1496,8 +1496,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001571: - resolution: {integrity: sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==} + /caniuse-lite@1.0.30001572: + resolution: {integrity: sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==} dev: true /chai@4.3.10: