fjs21 / homebridge-blueair

BlueAir air purifier plugin for homebridge
https://www.npmjs.com/package/@fjs21/homebridge-blueair
Apache License 2.0
50 stars 6 forks source link

Lint issue again #36

Closed fjs21 closed 2 years ago

fjs21 commented 2 years ago
/home/pi/dev/homebridge-blueair/src/blueair-aws-api.ts
   26:29  error    Don't use `object` as a type. The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).
Consider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys  @typescript-eslint/ban-types

Hi @jonato1, I tried to publish v1.1.1 with some minor fixes but ran into this issue again. I did some googling and it appears the use of object as a type is frowned upon.

Would this work?

private readonly awsKeys: Record<string, unknown>;
jonato1 commented 2 years ago

Hi @fjs21 - I think my latest commit should fix this (hopefully once and for all). https://github.com/fjs21/homebridge-blueair/commit/1b93208b3a1b5a05721e0b2f2627f116349902b8

Let me know if it passes the lint on your end - it looks like it passed the automated checks in GitHub for the npm publish --dry-run.

Thanks, Jon

fjs21 commented 2 years ago

Looks good. Thanks.