drowsy-probius / twitch-icon-selector

Either all code paths should have explicit returns, or none of them JS-0045
Anti-pattern
Minor
a year ago2 years old
Async arrow function expected no return value.
67
68    logger.info(`[find_3_streamer] loaded total ${streamerIcons.length} icons and statistics`, streamerIconStats);
69
70    return [streamerIcons, streamerIconStats];71  }
72  catch(err)
73  {
Async arrow function expected no return value.
54      fail = true;
55      error = `${watchingStreamer} is not in our whitelist`;
56      logger.info(error);
57      return [fail, error];58    }
59    if(!tagCommandEnabledStreamers.includes(watchingStreamer))
60    {
Async arrow function expected no return value.
23    streamers = Object.keys(iconStats);
24    logger.debug("[init_4_storage] localStorage", iconMetadata, iconStats);
25    logger.debug("[init_4_storage] syncStorage", iconRenderOptions);
26    return streamers;27  }
28  catch(err)
29  {
Async arrow function expected no return value
372  try 
373  {
374    logger.debug("[init_3_functions]");
375    return resetVariables();376  }
377  catch(err)
378  {
Expected to return a value at the end of arrow function
 61 * @returns 
 62 */
 63const waitForElement = (selector, parent, timeout=0) => {
 64  return new Promise((resolve) => { 65    const parentElement = parent ?? document.body;
 66    if (parentElement.querySelector(selector)) {
 67      return resolve(parentElement.querySelector(selector));