cityssm / node-green-button-subscriber

Initialization in variable declarations against recommended approach JS-0119
Anti-pattern
Minor
2 occurrences in this check
Variable 'greenButtonSubscriber' should be initialized on declaration
  4import { GreenButtonSubscriber } from '../index.js';
  5import { appId, authorizationId, configEnbridge as config, customerAccountId, customerId, meterId, readingId } from './config.js';
  6describe('node-green-button-subscriber', () => {
  7    let greenButtonSubscriber;  8    before(() => {
  9        greenButtonSubscriber = new GreenButtonSubscriber(config);
 10    });
Variable 'json' should be initialized on declaration
 82        if (endpointResponse === undefined) {
 83            return undefined;
 84        }
 85        let json; 86        if ((endpointResponse.data ?? '') !== '') {
 87            json = await atomToGreenButtonJson(endpointResponse.data);
 88        }