TryGhost/Ghost

View on GitHub

Showing 1,820 of 4,015 total issues

Avoid too many return statements within this function.
Open

            return amountWithDiscount * 4;
Severity: Major
Found in ghost/members-api/lib/repositories/MemberRepository.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                        return true;
    Severity: Major
    Found in ghost/members-csv/lib/parse.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return value;
      Severity: Major
      Found in ghost/members-csv/lib/parse.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return Math.floor(amountWithDiscount / 12);
        Severity: Major
        Found in ghost/members-api/lib/repositories/MemberRepository.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return false;
          Severity: Major
          Found in ghost/members-csv/lib/parse.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return await this._Product.findOne({id: data.id}, options);
            Severity: Major
            Found in ghost/members-api/lib/repositories/ProductRepository.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return amountWithDiscount * 30;
              Severity: Major
              Found in ghost/members-api/lib/repositories/MemberRepository.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                    return null;
                Severity: Major
                Found in ghost/members-csv/lib/parse.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return 0;
                  Severity: Major
                  Found in ghost/members-api/lib/repositories/MemberRepository.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return null;
                    Severity: Major
                    Found in ghost/members-api/lib/repositories/ProductRepository.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return getMemberIdentityData(email);
                      Severity: Major
                      Found in ghost/members-api/lib/members-api.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return res.end('Bad Request.');
                        Severity: Major
                        Found in ghost/members-api/lib/controllers/RouterController.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                              return next(new errors.InternalServerError({err: err}));
                          Severity: Major
                          Found in ghost/core/core/server/adapters/storage/LocalStorageBase.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return await stripeProduct.related('product').fetch(options);
                            Severity: Major
                            Found in ghost/members-api/lib/repositories/ProductRepository.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return sequence(ops);
                              Severity: Major
                              Found in ghost/core/core/server/models/post.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return await this._Product.findOne({slug: data.slug}, options);
                                Severity: Major
                                Found in ghost/members-api/lib/repositories/ProductRepository.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                                          return Promise.resolve();
                                  Severity: Major
                                  Found in ghost/core/core/server/models/user.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                        return Promise.reject(new errors.NoPermissionError({
                                                            message: tpl(messages.notEnoughPermission)
                                                        }));
                                    Severity: Major
                                    Found in ghost/core/core/server/models/user.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                  return Promise.resolve();
                                      Severity: Major
                                      Found in ghost/core/core/server/models/user.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                return Promise.reject(new errors.NoPermissionError({
                                                    message: tpl(messages.notEnoughPermission)
                                                }));
                                        Severity: Major
                                        Found in ghost/core/core/server/models/user.js - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language