TobiTenno/json-fetch-cache

View on GitHub

Showing 4 of 4 total issues

Function constructor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

constructor(url, timeout, options) {
super();
 
// eslint-disable-next-line no-param-reassign
options = {
Severity: Minor
Found in jsoncache.js - About 1 hr to fix

    Function httpGet has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    httpGet() {
    return new this.Promise((resolve) => {
    const request = this.protocol.get(this.url, (response) => {
    this.logger.debug(`beginning request to ${this.url}`);
    const body = [];
    Severity: Minor
    Found in jsoncache.js - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      } else {
      this.logger.error(`${response.statusCode}: Failed to load ${this.url}`);
      resolve('[]');
      }
      Severity: Minor
      Found in jsoncache.js and 1 other location - About 35 mins to fix
      jsoncache.js on lines 132..135

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      request.on('error', (err) => {
      this.logger.error(`${err.statusCode}: ${this.url}`);
      resolve('[]');
      });
      Severity: Minor
      Found in jsoncache.js and 1 other location - About 35 mins to fix
      jsoncache.js on lines 120..123
      Severity
      Category
      Status
      Source
      Language