TryGhost/Ghost

View on GitHub

Showing 1,820 of 4,015 total issues

Avoid too many return statements within this function.
Open

    return event;

    Avoid too many return statements within this function.
    Open

                return User.getOwnerUser()
                    .then((owner) => {
                        // CASE: owner can assign role to any user
                        if (context.user === owner.id) {
                            if (hasUserPermission && hasApiKeyPermission) {
    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.ValidationError({
                                      message: tpl(messages.invalidRoleValue.message),
                                      context: tpl(messages.invalidRoleValue.context),
                                      help: tpl(messages.invalidRoleValue.help)
      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 hasMemberPermission;
        Severity: Major
        Found in ghost/core/core/server/models/comment.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return this.utils.createUrl('/404/', false);
          Severity: Major
          Found in ghost/core/core/server/services/url/UrlService.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return '/404/';
            Severity: Major
            Found in ghost/core/core/server/services/url/UrlService.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return BLOCK_ACCESS;
              Severity: Major
              Found in ghost/core/core/server/services/members/content-gating.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return PERMIT_ACCESS;
                Severity: Major
                Found in ghost/core/core/server/services/members/content-gating.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                      return;
                  Severity: Major
                  Found in ghost/core/core/server/data/importer/importers/data/Base.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return;

                      Avoid too many return statements within this function.
                      Open

                              return null;
                      Severity: Major
                      Found in ghost/core/core/server/lib/image/BlogIcon.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return;

                          Avoid too many return statements within this function.
                          Open

                                          return;
                          Severity: Major
                          Found in ghost/core/core/server/data/importer/importers/data/Base.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                            return Promise.reject(new errors.InternalServerError({
                                                message: 'Unknown Request error.',
                                                code: 'IMAGE_SIZE_URL',
                                                statusCode: err.statusCode,
                                                context: err.url || imagePath,
                            Severity: Major
                            Found in ghost/core/core/server/lib/image/ImageSize.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                                  return;
                              Severity: Major
                              Found in ghost/core/core/server/data/importer/importers/data/Base.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                    return;
                                Severity: Major
                                Found in ghost/core/core/server/data/importer/importers/data/Base.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          return '';
                                  Severity: Major
                                  Found in ghost/core/core/frontend/helpers/price.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return null;
                                    Severity: Major
                                    Found in ghost/core/core/frontend/meta/og-image.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return null;
                                      Severity: Major
                                      Found in ghost/core/core/frontend/meta/schema.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                            return [imgBlogUrl, urlUtils.STATIC_IMAGE_URL_PREFIX, `/size/${sizeDirectoryName}`, formatPrefix, imageName].join('');
                                        Severity: Major
                                        Found in ghost/core/core/frontend/utils/images.js - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language