Fix linting issues
This commit is contained in:
parent
e338c982d2
commit
ba3786bf6d
3 changed files with 6 additions and 24 deletions
|
@ -7,7 +7,12 @@ module.exports = {
|
|||
'prettier/prettier': 'warn',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
||||
'prefer-arrow-callback': 'error',
|
||||
'sort-imports': 'warn',
|
||||
'sort-imports': [
|
||||
'error',
|
||||
{
|
||||
ignoreDeclarationSort: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import type { HapDiscover } from './api'
|
||||
import { HAPNodeJSClient } from 'hap-node-client'
|
||||
|
||||
import { Device, DeviceBoundary } from '../../boundaries'
|
||||
import { Array, Unknown } from 'runtypes'
|
||||
import { Logger } from 'homebridge'
|
||||
|
|
|
@ -18,28 +18,6 @@ export class Metric {
|
|||
*/
|
||||
const METRICS_FILTER = ['Identifier']
|
||||
|
||||
function debug(devices: Device[]): void {
|
||||
const debugInfo = []
|
||||
|
||||
for (const device of devices) {
|
||||
for (const accessory of device.accessories.accessories) {
|
||||
for (const service of accessory.services) {
|
||||
const info = []
|
||||
for (const characteristic of service.characteristics) {
|
||||
info.push(
|
||||
[characteristic.description, 'value' in characteristic ? characteristic.value : '<none>'].join(
|
||||
': ',
|
||||
),
|
||||
)
|
||||
}
|
||||
debugInfo.push(['Service ' + Services[service.type as keyof typeof Services], info])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(debugInfo, null, 4))
|
||||
}
|
||||
|
||||
export function aggregate(devices: Device[], timestamp: Date): Metric[] {
|
||||
const metrics: Metric[] = []
|
||||
|
||||
|
|
Loading…
Reference in a new issue