Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Jul 21, 2024
1 parent e534216 commit 67c4a84
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"main": "dist/index.js",
"scripts": {
"lint": "eslint src/**/*.ts --max-warnings=0",
"fix": "eslint src/**/*.ts --fix",
"watch": "npm run build && npm link && nodemon",
"build": "rimraf ./dist && tsc",
"prepublishOnly": "npm run lint && npm run build"
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/chargeport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ChargePortService extends BaseService {
currentState.updateValue(0)
)
.catch((e) => this.log.error(`${this.name} vehicle charge_port_door_open failed: ${e}`))
)
);
});

this.parent.emitter.on("vehicle_data", (data) => {
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/defrost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class DefrostService extends BaseService {
await this.parent.wakeUpAndWait()
.then(() => this.vehicle.set_preconditioning_max(value as boolean, false))
.then(() => on.updateValue(value))
.catch((e) => this.log.error(`${this.name} vehicle set_preconditioning_max failed: ${e}`))
.catch((e) => this.log.error(`${this.name} vehicle set_preconditioning_max failed: ${e}`));
});

this.parent.emitter.on("vehicle_data", (data) => {
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/door.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class DoorService extends BaseService {
await this.parent.wakeUpAndWait()
.then(() => this.parent.vehicle.actuate_truck(this.trunk))
.then(() => currentPosition.updateValue(value))
.catch((e) => this.log.error(`${this.name} vehicle actuate_truck failed: ${e}`))
.catch((e) => this.log.error(`${this.name} vehicle actuate_truck failed: ${e}`));
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/homelink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class HomelinkService extends BaseService {
current.updateValue(false);
target.updateValue(false);
})
.catch((e) => this.log.error(`${this.name} vehicle trigger_homelink failed: ${e}`))
.catch((e) => this.log.error(`${this.name} vehicle trigger_homelink failed: ${e}`));
}
})
.updateValue(this.platform.Characteristic.TargetDoorState.CLOSED);
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/information.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class AccessoryInformationService {


constructor(private parent: VehicleAccessory) {
this.name = this.parent.accessory.displayName
this.name = this.parent.accessory.displayName;
this.log = this.parent.platform.log;

this.service = this.parent.accessory.getService(this.parent.platform.Service.AccessoryInformation)!
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class SentryService extends BaseService {
await this.parent.wakeUpAndWait()
.then(() => this.vehicle.set_sentry_mode(value !== 3))
.then(() => current.updateValue(value))
.catch((e) => this.log.error(`${this.name} vehicle set_sentry_mode failed: ${e}`))
.catch((e) => this.log.error(`${this.name} vehicle set_sentry_mode failed: ${e}`));
});

this.parent.emitter.on("vehicle_data", (data) => {
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/wake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class WakeService extends BaseService {
if (value) {
await this.parent.wakeUpAndWait()
.then(() => on.updateValue(true))
.catch((e) => this.log.error(`${this.name} vehicle wake_up failed: ${e}`))
.catch((e) => this.log.error(`${this.name} vehicle wake_up failed: ${e}`));
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ export class WindowService extends BaseService {
await this.parent.wakeUpAndWait()
.then(() => this.parent.vehicle.window_control(value === 100 ? "vent" : "close", this.latitude, this.longitude))
.then(() => characteristic.updateValue(value))
.catch((e) => this.log.error(`${this.name} vehicle window_control failed: ${e}`))
.catch((e) => this.log.error(`${this.name} vehicle window_control failed: ${e}`));
}
}

0 comments on commit 67c4a84

Please sign in to comment.