Skip to content

Commit

Permalink
build: temporary silence linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
  • Loading branch information
Jérôme Benoit authored and ev-adias committed Jan 30, 2025
1 parent 8148515 commit 4faa77e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/charging-station/SharedLRUCache.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 2 additions & 0 deletions src/charging-station/ocpp/OCPPIncomingRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -117,6 +118,7 @@ export abstract class OCPPIncomingRequestService {
schema: JSONSchemaType<T>,
) {
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<T>(schema).bind(this));
}
return this.jsonValidateFunctions.get(commandName)!;
Expand Down
5 changes: 5 additions & 0 deletions src/charging-station/ocpp/OCPPRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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<T>(this.jsonSchemas.get(commandName)!).bind(this),
);
}
Expand Down Expand Up @@ -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<T>(this.ocppResponseService.jsonIncomingRequestResponseSchemas.get(commandName)!)
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
.bind(this),
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/charging-station/ocpp/OCPPResponseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -101,6 +102,7 @@ export abstract class OCPPResponseService {
schema: JSONSchemaType<T>,
) {
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<T>(schema).bind(this));
}
return this.jsonRequestValidateFunctions.get(commandName)!;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/AsyncLock.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
6 changes: 3 additions & 3 deletions ui/web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4faa77e

Please sign in to comment.