Skip to content

Commit

Permalink
build(ci): silence linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
  • Loading branch information
jerome-benoit committed Aug 27, 2024
1 parent 72ccf0b commit 3b7b2e3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/charging-station/ChargingStation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ export class ChargingStation extends EventEmitter {
if (stationInfoPersistentConfiguration) {
stationInfo = this.getConfigurationFromFile()?.stationInfo
if (stationInfo != null) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
delete stationInfo.infoHash
delete (stationInfo as ChargingStationTemplate).numberOfConnectors
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
Expand Down
18 changes: 18 additions & 0 deletions src/utils/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,33 +93,43 @@ export class Configuration {
private static buildLogSection (): LogConfiguration {
const deprecatedLogConfiguration: LogConfiguration = {
...(hasOwnProp(Configuration.getConfigurationData(), 'logEnabled') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
enabled: Configuration.getConfigurationData()?.logEnabled,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logFile') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
file: Configuration.getConfigurationData()?.logFile,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logErrorFile') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
errorFile: Configuration.getConfigurationData()?.logErrorFile,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logStatisticsInterval') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
statisticsInterval: Configuration.getConfigurationData()?.logStatisticsInterval,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logLevel') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
level: Configuration.getConfigurationData()?.logLevel,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logConsole') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
console: Configuration.getConfigurationData()?.logConsole,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logFormat') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
format: Configuration.getConfigurationData()?.logFormat,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logRotate') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
rotate: Configuration.getConfigurationData()?.logRotate,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logMaxFiles') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
maxFiles: Configuration.getConfigurationData()?.logMaxFiles,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'logMaxSize') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
maxSize: Configuration.getConfigurationData()?.logMaxSize,
}),
}
Expand Down Expand Up @@ -192,28 +202,36 @@ export class Configuration {
private static buildWorkerSection (): WorkerConfiguration {
const deprecatedWorkerConfiguration: WorkerConfiguration = {
...(hasOwnProp(Configuration.getConfigurationData(), 'workerProcess') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
processType: Configuration.getConfigurationData()?.workerProcess,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'workerStartDelay') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
startDelay: Configuration.getConfigurationData()?.workerStartDelay,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'chargingStationsPerWorker') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
elementsPerWorker: Configuration.getConfigurationData()?.chargingStationsPerWorker,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'elementAddDelay') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
elementAddDelay: Configuration.getConfigurationData()?.elementAddDelay,
}),
...(hasOwnProp(Configuration.getConfigurationData()?.worker, 'elementStartDelay') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
elementAddDelay: Configuration.getConfigurationData()?.worker?.elementStartDelay,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'workerPoolMinSize') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
poolMinSize: Configuration.getConfigurationData()?.workerPoolMinSize,
}),
...(hasOwnProp(Configuration.getConfigurationData(), 'workerPoolMaxSize') && {
// eslint-disable-next-line @typescript-eslint/no-deprecated
poolMaxSize: Configuration.getConfigurationData()?.workerPoolMaxSize,
}),
}
hasOwnProp(Configuration.getConfigurationData(), 'workerPoolStrategy') &&
// eslint-disable-next-line @typescript-eslint/no-deprecated
delete Configuration.getConfigurationData()?.workerPoolStrategy
const workerConfiguration: WorkerConfiguration = {
...defaultWorkerConfiguration,
Expand Down

0 comments on commit 3b7b2e3

Please sign in to comment.