KOSASIH / Mellobank

Void operators found JS-0098
Anti-pattern
Minor
2 years ago2 years old
Expected 'undefined' and instead saw 'void'.
40        { reusableObjectsLocation: `#/components/${type}` },
41        context
42      );
43      if (resultsForType !== void 0 && Array.isArray(resultsForType)) {44        results.push(...resultsForType);
45      }
46    }
Expected 'undefined' and instead saw 'void'.
  5const pathRegex = /(\{;?\??[a-zA-Z0-9_-]+\*?\})/g;
  6
  7const isNamedPathParam = (p) => {
  8  return p.in !== void 0 && p.in === "path" && p.name !== void 0;  9};
 10
 11const isUnknownNamedPathParam = (p, path, results, seen) => {
Expected 'undefined' and instead saw 'void'.
  5const pathRegex = /(\{;?\??[a-zA-Z0-9_-]+\*?\})/g;
  6
  7const isNamedPathParam = (p) => {
  8  return p.in !== void 0 && p.in === "path" && p.name !== void 0;  9};
 10
 11const isUnknownNamedPathParam = (p, path, results, seen) => {
Expected 'undefined' and instead saw 'void'.
247      });
248
249      if (Array.isArray(result)) {
250        if (results === void 0) results = [];251        results.push(...result);
252      }
253    }
Expected 'undefined' and instead saw 'void'.
214        opts.schemaField === "$" ? targetVal : targetVal[opts.schemaField],
215    };
216
217    let results = void 0;218    let oasVersion = parseInt(opts.oasVersion);
219
220    const validationItems =