Showing 165 of 175 total issues
File chat.jsx
has 1889 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { h, Component } from 'preact';
import PropTypes from 'prop-types';
import { setupPusher } from '../utilities/connect';
import { notifyUser } from '../utilities/connect/newMessageNotify';
import { debounceAction } from '../utilities/debounceAction';
Function initializePodcastPlayback
has 498 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
function initializePodcastPlayback() {
var deviceType = 'web';
function getById(name) {
return document.getElementById(name);
Chat
has 89 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class Chat extends Component {
static propTypes = {
pusherKey: PropTypes.number.isRequired,
chatChannels: PropTypes.string.isRequired,
chatOptions: PropTypes.string.isRequired,
Function buildArticleHTML
has 298 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
function buildArticleHTML(article) {
if (article && article.class_name === 'PodcastEpisode') {
return `<article class="crayons-story crayons-podcast-episode mb-2">
<div class="crayons-story__body flex flex-start">
<a href="${article.podcast.slug}" class="crayons-podcast-episode__cover">
Class User
has 71 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class User < ApplicationRecord
resourcify
include CloudinaryHelper
include Searchable
File user.rb
has 539 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class User < ApplicationRecord
resourcify
include CloudinaryHelper
include Searchable
File initializePodcastPlayback.js
has 501 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* This script hunts for podcast's "Record" for both the podcast_episde's
* show page and an article page containing podcast liquid tag. It handles
* playback and makes sure the record will spin when the podcast is currently
* playing.
Function render
has 187 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
render() {
const {
listings,
orgListings,
userCredits,
File tags.jsx
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { h, Component } from 'preact';
import PropTypes from 'prop-types';
import { fetchSearch } from '../../utilities/search';
const KEYS = {
File ChatChannelSettings.jsx
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { h, Component } from 'preact';
import PropTypes from 'prop-types';
import {
getChannelDetails,
File initScrolling.js
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* global insertAfter, insertArticles, buildArticleHTML, nextPage:writable, fetching:writable, done:writable, InstantClick */
var client;
function fetchNext(el, endpoint, insertCallback) {
File stories_controller.rb
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class StoriesController < ApplicationController
DEFAULT_HOME_FEED_ATTRIBUTES_FOR_SERIALIZATION = {
only: %i[
title path id user_id comments_count public_reactions_count organization_id
reading_time video_thumbnail_url video video_duration_in_minutes
Class Comment
has 42 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Comment < ApplicationRecord
has_ancestry
resourcify
include Reactable
Function initializeVideoPlayback
has 164 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
function initializeVideoPlayback() {
var currentTime = '0';
var deviceType = 'web';
var lastEvent = '';
Class StoriesController
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class StoriesController < ApplicationController
DEFAULT_HOME_FEED_ATTRIBUTES_FOR_SERIALIZATION = {
only: %i[
title path id user_id comments_count public_reactions_count organization_id
reading_time video_thumbnail_url video video_duration_in_minutes
File actionsPanel.js
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { toggleFlagUserModal } from '../packs/flagUserModal';
import { request } from '@utilities/http';
export function addCloseListener() {
const button = document.getElementsByClassName('close-actions-panel')[0];
Function render
has 141 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
render() {
const { showOptions, subscriptionType, subscribed } = this.state;
const {
onSubscribe,
onUnsubscribe,
File articleForm.jsx
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { h, Component } from 'preact';
import PropTypes from 'prop-types';
import linkState from 'linkstate';
import postscribe from 'postscribe';
import { KeyboardShortcuts } from '../shared/components/useKeyboardShortcuts';
File site_config.rb
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module Constants
module SiteConfig
IMAGE_PLACEHOLDER = "https://url/image.png".freeze
SVG_PLACEHOLDER = "<svg ...></svg>".freeze
Function render
has 130 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
render() {
const {
slidesCount,
currentSlideIndex,
prev,