Showing 1,820 of 4,015 total issues
Function read
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async read(model, apiConfig, frame) {
const tiersPage = await tiersService.api.browse({});
const tiers = tiersPage.data?.map((tierModel) => {
const json = tierModel.toJSON();
return {
Function all
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async all(model, apiConfig, frame) {
const tiersPage = await tiersService.api.browse({});
const tiers = tiersPage.data?.map((tierModel) => {
const json = tierModel.toJSON();
return {
Function add
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async add(data, options) {
const webhook = await this.WebhookModel.getByEventAndTarget(
data.webhooks[0].event,
data.webhooks[0].target_url,
options
Function fetchData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async fetchData() {
const totalMembers = await this.MembersService.stats.getTotalMembers();
const mrrStats = await this.StatsService.api.getMRRHistory();
const {description, icon, title, url, accent_color: accentColor, locale} = this.PublicConfigService.site;
Function getFromAddress
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getFromAddress(requestedFromAddress, requestedReplyToAddress) {
if (settingsHelpers.useNewEmailAddresses()) {
if (!requestedFromAddress) {
// Use the default config
requestedFromAddress = emailAddress.service.defaultFromEmail;
Function prepSettingsForEmailVerification
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async prepSettingsForEmailVerification(settings, getSetting) {
const filteredSettings = [];
const emailsToVerify = [];
for (const setting of settings) {
Function constructor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(name) {
super({gc: true});
this.name = name;
/**
* Maps from conn to set of controlled user ids. Delete all user ids from awareness when this conn is closed
Function start
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
start(options) {
debug('start');
// CASE: nobody is in the event queue waiting yet
// e.g. all resources are fetched already, but no subscribers (bootstrap)
Function init
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init() {
const CommentsService = require('./CommentsService');
const CommentsController = require('./CommentsController');
const CommentsStats = require('./CommentsStatsService');
Function down
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function down(knex) {
logging.info('Deleting built in collection_posts');
const existingLatestCollection = await knex('collections')
.where({
Function removePermissionFromRoleHelper
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function removePermissionFromRoleHelper(connection, config) {
const permission = await connection('permissions').where({
name: config.permission
}).first();
Function up
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up(knex) {
const allOffers = await knex
.select('id', 'name')
.from('offers');
Function addIntegrationContentKey
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const addIntegrationContentKey = async (knex, integration) => {
const message = `Adding "${integration.name}" integration content key`;
const existingIntegration = await knex('integrations').select('id').where({
slug: integration.slug
Function up
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up(knex) {
const portalPlansRaw = await knex('settings').select('value').where('key', 'portal_plans').first();
const freeTier = await knex('products').select('visibility').where('type', 'free').first();
if (!portalPlansRaw || !freeTier) {
Function getAnnouncementBarHelper
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getAnnouncementBarHelper(data) {
const preview = data?.site?._preview;
const isFilled = settingsCache.get('announcement_content') && settingsCache.get('announcement_visibility').length;
if (!isFilled && !preview) {
Function fetchRecommendations
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function fetchRecommendations(apiOptions) {
let timer;
try {
const controller = api.recommendationsPublic;
Function scrollSidebarNav
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const scrollSidebarNav = (navElement: HTMLLIElement, doneInitialScroll: boolean) => {
// const sidebar = document.getElementById('admin-x-settings-sidebar')!;
const sidebar = document.getElementById('admin-x-settings-sidebar-scroller')!;
const bounds = navElement.getBoundingClientRect();
Function import
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async import() {
let offset = 0;
let limit = 5000;
this.products = await this.transaction.select('id', 'name').from('products').whereNot('type', 'free');
this.stripeProducts = await this.transaction.select('id', 'product_id', 'stripe_product_id').from('stripe_products');
Function compare
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
compare(postA, postB) {
let updated1 = postA.get('updatedAtUTC');
let updated2 = postB.get('updatedAtUTC');
let idResult,
publishedAtResult,
Function init
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init() {
this._super(...arguments);
this.set('errors', Errors.create());
this.set('hasValidated', emberA());