Showing 1,820 of 4,015 total issues
Function authors
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function authors(options = {}) {
options.hash = options.hash || {};
let {
autolink,
Function entryController
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function entryController(req, res, next) {
debug('entryController', res.routerOptions);
return dataService.entryLookup(req.path, res.routerOptions, res.locals)
.then(function then(lookup) {
Function start
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
start(routerSettings) {
debug('routing start', routerSettings);
const RESOURCE_CONFIG = require(`./config`);
const unsubscribeRouter = new UnsubscribeRouter();
Function renderTriggerIcon
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderTriggerIcon() {
const {portal_button_icon: buttonIcon = '', portal_button_style: buttonStyle = ''} = this.context.site || {};
const Style = Styles({brandColor: this.context.brandColor});
const memberGravatar = this.context.member && this.context.member.avatar_image;
Function sendMagicLink
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async sendMagicLink({email, emailType, labels, name, oldEmail, newsletters, redirect, integrityToken, phonenumber, customUrlHistory, autoRedirect = true}) {
const url = endpointFor({type: 'members', resource: 'send-magic-link'});
const body = {
name,
email,
Function validatePayload
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validatePayload(payload: Payload) {
if (payload.signature === undefined) {
throw new errors.ValidationError({
message: tpl(VALIDATION_MESSAGES.payloadSignatureMissing)
});
Function getOfferPortalPreviewUrl
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getOfferPortalPreviewUrl = (overrides:offerPortalPreviewUrlTypes, baseUrl: string) : string => {
const {
disableBackground = false,
name,
code,
Function verify
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const verify = async () => {
try {
const {newsletters: [updatedNewsletter], meta: {email_verified: emailVerified} = {}} = await verifyEmail({token: verifyEmailToken});
let title;
let prompt;
Function getOfferDiscount
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getOfferDiscount = (type: string, amount: number, cadence: string, currency: string, tier: Tier | undefined): {discountColor: string, discountOffer: string, originalPriceWithCurrency: string, updatedPriceWithCurrency: string} => {
let discountColor = '';
let discountOffer = '';
const originalPrice = cadence === 'month' ? tier?.monthly_price ?? 0 : tier?.yearly_price ?? 0;
let updatedPrice = originalPrice;
Function useHandleError
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const useHandleError = () => {
const {sentryDSN} = useFramework();
/**
* @param error Thrown error.
Function getAttributionFromContext
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getAttributionFromContext(context) {
if (!context || !this.isTrackingEnabled) {
return null;
}
Function uiText
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function uiText([style]) {
let cssClass = '';
switch (style) {
case 'h1':
Function _passwordSetup
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_passwordSetup() {
let setupProperties = ['blogTitle', 'name', 'email', 'password'];
let data = this.getProperties(setupProperties);
let method = this.blogCreated ? 'put' : 'post';
Function errorsWithFormattedMessages
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const errorsWithFormattedMessages = erroredMembers.map((row) => {
const formattedError = row.error
.replace(
'Value in [members.email] cannot be blank.',
'Missing email address'
Function getOfferPortalPreviewUrl
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getOfferPortalPreviewUrl(overrides) {
const {
disableBackground = false,
name,
code,
Function updateCheckRequest
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async updateCheckRequest() {
const reqData = await this.updateCheckData();
let reqObj = {
timeout: {
Function getEmailDeliveredEvents
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getEmailDeliveredEvents(options = {}, filter) {
options = {
...options,
withRelated: ['member', 'email'],
filter: 'delivered_at:-null+custom:true',
Function getEmailFailedEvents
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getEmailFailedEvents(options = {}, filter) {
options = {
...options,
withRelated: ['member', 'email'],
filter: 'failed_at:-null+custom:true',
Function getEmailOpenedEvents
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getEmailOpenedEvents(options = {}, filter) {
options = {
...options,
withRelated: ['member', 'email'],
filter: 'opened_at:-null+custom:true',
Function getPaymentLink
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getPaymentLink({tier, cadence, offer, member, metadata, successUrl, cancelUrl, email}) {
let coupon = null;
let trialDays = null;
if (offer) {
if (!tier.id.equals(offer.tier.id)) {