thepracticaldev/dev.to

View on GitHub

Showing 162 of 162 total issues

File chat.jsx has 990 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { h, Component } from 'preact';
import PropTypes from 'prop-types';
import ConfigImage from '../../assets/images/three-dots.svg';
import {
  conductModeration,
Severity: Major
Found in app/javascript/chat/chat.jsx - About 2 days to fix

    Class User has 86 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class User < ApplicationRecord
      include CloudinaryHelper
    
      attr_accessor(
        :scholar_email, :new_note, :note_for_current_role, :user_status, :pro, :merge_user_id,
    Severity: Major
    Found in app/models/user.rb - About 1 day to fix

      Function initializePodcastPlayback has 257 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function initializePodcastPlayback() {
        function getById(name) {
          return document.getElementById(name);
        }
      
      
      Severity: Major
      Found in app/assets/javascripts/initializers/initializePodcastPlayback.js - About 1 day to fix

        File user.rb has 545 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        class User < ApplicationRecord
          include CloudinaryHelper
        
          attr_accessor(
            :scholar_email, :new_note, :note_for_current_role, :user_status, :pro, :merge_user_id,
        Severity: Major
        Found in app/models/user.rb - About 1 day to fix

          Function render has 224 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render() {
              const {
                listings,
                query,
                tags,
          Severity: Major
          Found in app/javascript/listings/listings.jsx - About 1 day to fix

            File article.rb has 523 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            class Article < ApplicationRecord
              include CloudinaryHelper
              include ActionView::Helpers
              include AlgoliaSearch
              include Storext.model
            Severity: Major
            Found in app/models/article.rb - About 1 day to fix

              Class Article has 59 methods (exceeds 20 allowed). Consider refactoring.
              Open

              class Article < ApplicationRecord
                include CloudinaryHelper
                include ActionView::Helpers
                include AlgoliaSearch
                include Storext.model
              Severity: Major
              Found in app/models/article.rb - About 1 day to fix

                File listings.jsx has 489 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import { h, Component } from 'preact';
                import { SingleListing } from './singleListing';
                
                function resizeMasonryItem(item) {
                  /* Get the grid object, its row-gap, and the size of its implicit rows */
                Severity: Minor
                Found in app/javascript/listings/listings.jsx - About 7 hrs to fix

                  Chat has 54 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  export default class Chat extends Component {
                    static propTypes = {
                      pusherKey: PropTypes.number.isRequired,
                      chatChannels: PropTypes.string.isRequired,
                      chatOptions: PropTypes.string.isRequired,
                  Severity: Major
                  Found in app/javascript/chat/chat.jsx - About 7 hrs to fix

                    File articleForm.jsx has 474 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import 'preact/devtools';
                    import { h, Component } from 'preact';
                    import PropTypes from 'prop-types';
                    import linkState from 'linkstate';
                    import postscribe from 'postscribe';
                    Severity: Minor
                    Found in app/javascript/article-form/articleForm.jsx - About 7 hrs to fix

                      Function render has 180 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        render() {
                          const {
                            listings,
                            orgListings,
                            userCredits,
                      Severity: Major
                      Found in app/javascript/listings/listingDashboard.jsx - About 7 hrs to fix

                        Function render has 179 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render() {
                            // cover image url should asking for url OR providing option to upload an image
                            const {
                              title,
                              tagList,
                        Severity: Major
                        Found in app/javascript/article-form/articleForm.jsx - About 7 hrs to fix

                          Function render has 179 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            render() {
                              const { user } = this.props;
                              const channelId = this.props.activeChannelId;
                              const channel = this.props.activeChannel || {};
                              const socialIcons = [];
                          Severity: Major
                          Found in app/javascript/chat/userDetails.jsx - About 7 hrs to fix

                            Function render has 158 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              render() {
                                const { previousLocation, variant } = this.props;
                            
                                const previousLocationListElement = () => {
                                  if (variant === '6' || variant === '8') {
                            Severity: Major
                            Found in app/javascript/onboarding/components/ClosingSlide.jsx - About 6 hrs to fix

                              File tags.jsx has 395 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import { h, Component } from 'preact';
                              import PropTypes from 'prop-types';
                              
                              const KEYS = {
                                UP: 'ArrowUp',
                              Severity: Minor
                              Found in app/javascript/shared/components/tags.jsx - About 5 hrs to fix

                                Function render has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render() {
                                    const channel = this.props.channel; // eslint-disable-line
                                    const users = Object.values(channel.channel_users).map(user => (
                                      <div className="channeldetails__user">
                                        <img
                                Severity: Major
                                Found in app/javascript/chat/channelDetails.jsx - About 5 hrs to fix

                                  Class Comment has 38 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Comment < ApplicationRecord
                                    has_ancestry
                                    resourcify
                                    include AlgoliaSearch
                                    include Reactable
                                  Severity: Minor
                                  Found in app/models/comment.rb - About 5 hrs to fix

                                    Function render has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      render() {
                                        const { onExit, mainImage, version } = this.props;
                                        const { insertionImageUrls, uploadError, uploadErrorMessage } = this.state;
                                        let mainImageArea;
                                    
                                    
                                    Severity: Major
                                    Found in app/javascript/article-form/elements/imageManagement.jsx - About 4 hrs to fix

                                      Function nextStepLinks has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          const nextStepLinks = () => {
                                            if (variant === '7' || variant === '8') {
                                              return (
                                                <div className="onboarding-what-next">
                                                  <a
                                      Severity: Major
                                      Found in app/javascript/onboarding/components/ClosingSlide.jsx - About 4 hrs to fix

                                        Function initializeCommentDropdown has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function initializeCommentDropdown() {
                                          const announcer = document.getElementById('article-copy-link-announcer');
                                        
                                          function isIOSDevice() {
                                            return (
                                        Severity: Major
                                        Found in app/assets/javascripts/initializers/initializeCommentDropdown.js - About 4 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language