TryGhost/Ghost

View on GitHub

Showing 1,820 of 4,015 total issues

Avoid too many return statements within this function.
Open

                return {
                    referrerSource: knownSource?.source || referrerSource,
                    referrerMedium: knownSource?.medium || referrerMedium || urlData?.medium || null,
                    referrerUrl: referrerUrl?.hostname ?? null
                };
Severity: Major
Found in ghost/member-attribution/lib/ReferrerTranslator.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return {
                referrerSource: 'Direct',
                referrerMedium: null,
                referrerUrl: null
            };
    Severity: Major
    Found in ghost/member-attribution/lib/ReferrerTranslator.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return 'clicked link in email';
      Severity: Major
      Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return 1;
        Severity: Major
        Found in ghost/admin/app/models/post.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return statusResult;
          Severity: Major
          Found in ghost/admin/app/models/post.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return null;
            Severity: Major
            Found in ghost/admin/app/helpers/parse-history-event.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return 'Made a one-time payment';
              Severity: Major
              Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return time.format(`[at] HH:mm [${utcOffset}] [tomorrow]`);
                Severity: Major
                Found in ghost/admin/app/helpers/gh-format-post-time.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return {
                                      referrerSource: referrerUrl?.hostname ?? null,
                                      referrerMedium: null,
                                      referrerUrl: referrerUrl?.hostname ?? null
                                  };
                  Severity: Major
                  Found in ghost/member-attribution/lib/ReferrerTranslator.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return 'unsubscribed from ' + newsletter;
                    Severity: Major
                    Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return 'replied to comment';
                      Severity: Major
                      Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return 'more like this';
                        Severity: Major
                        Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return `Email address changed from ${event.data.from_email} to ${event.data.to_email}`;
                          Severity: Major
                          Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return formattedAmount;
                            Severity: Major
                            Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return {
                                              route: 'offer',
                                              models: [ev.resource.id]
                                          };
                              Severity: Major
                              Found in ghost/admin/app/helpers/parse-history-event.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                return null;
                                Severity: Major
                                Found in ghost/admin/app/helpers/parse-history-event.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return tag;
                                  Severity: Major
                                  Found in ghost/member-attribution/lib/UrlTranslator.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                return publishedAtResult * -1;
                                    Severity: Major
                                    Found in ghost/admin/app/models/post.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                      return 'canceled paid subscription';
                                      Severity: Major
                                      Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                        return 'ended paid subscription';
                                        Severity: Major
                                        Found in ghost/admin/app/helpers/parse-member-event.js - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language