initiatived21/d21

View on GitHub

Showing 63 of 611 total issues

Function swipeDetect has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function swipeDetect(el, callback) {
  var touchsurface = el,
    swipedir,
    startX,
    startY,
Severity: Minor
Found in client/app/lib/browser/swipeDetect.js - About 1 hr to fix

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

      render() {
        const { imagePath, name, large, className } = this.props
    
        let avatarName
        if (name) {
    Severity: Minor
    Found in client/app/Avatar/components/CommentAvatar.jsx - About 1 hr to fix

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

        render() {
          const { width, src, crop, onComplete, handleFinishCrop, onCancelClick } = this.props
      
          return (
            <div className="c-image-input__crop-tool" >
      Severity: Minor
      Found in client/app/Inputs/components/ImageCrop.jsx - About 1 hr to fix

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

          render() {
            const { state } = this.props
        
            let awesomeName, className
            switch(state) {
        Severity: Minor
        Found in client/app/PledgeTile/components/StateHeader.jsx - About 1 hr to fix

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

            render() {
              const { pledgeId, showEditButton, showDeleteButton, showRequestButton,
                deleteConfirmationMessage } = this.props
          
              console.log('showRequestButton', showRequestButton)
          Severity: Minor
          Found in client/app/PledgeTile/components/StateFooter.jsx - About 1 hr to fix

            Function Schemas has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const Schemas = new function() {
              this.pledge =
                new Schema('pledges', {
                  idAttribute: 'id'
                })
            Severity: Minor
            Found in client/app/lib/normalization.js - About 1 hr to fix

              Function calculateDefaultCrop has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function calculateDefaultCrop(imgWidth, imgHeight, cropAspectRatio) {
                let cropWidth, cropHeight, cropX, cropY
                const imageAspectRatio = imgWidth / imgHeight
              
                if (imgWidth > imgHeight) {
              Severity: Minor
              Found in client/app/lib/image_processing/calculateDefaultCrop.js - About 1 hr to fix

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

                  render() {
                    const {
                      state, initiatorName, initiatorImage, title, deadline, signatures_count,
                      signatures_total, path, tags, className
                    } = this.props
                Severity: Minor
                Found in client/app/PledgeTile/components/PledgeTileFront.jsx - About 1 hr to fix

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

                    render() {
                      const { formData, id, isSubmitting, handleResponse, afterResponse, wasSubmitted } = this.props
                  
                      let formOrMessage
                      if (wasSubmitted) {
                  Severity: Minor
                  Found in client/app/CommentList/components/QuestionForm.jsx - About 1 hr to fix

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

                      render() {
                        const { type, onDropFile, onRemoveFileClick, filename, isServerImage } = this.props
                    
                        let modalElement
                        if (filename || isServerImage) {
                    Severity: Minor
                    Found in client/app/Inputs/components/ImageDropzone.jsx - About 1 hr to fix

                      Function mapStateToProps has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const mapStateToProps = (state, ownProps) => {
                        const pledge = ownProps.pledge
                        const aasm_state = pledge.aasm_state
                      
                        const currentUserId = state.currentUser
                      Severity: Minor
                      Found in client/app/PledgeTile/containers/StateFooterContainer.js - About 1 hr to fix

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

                          render() {
                            const currentPage = `${this.props.controller}#${this.props.action}`
                        
                            return (
                              <ul className="c-off-canvas-menu__inner">
                        Severity: Minor
                        Found in client/app/OffCanvasMenu/components/OffCanvasMenu.jsx - About 1 hr to fix

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

                            render() {
                              const {
                                initiatorName, initiatorImage, content, amount, who, requirement, path,
                                className, locale
                              } = this.props
                          Severity: Minor
                          Found in client/app/PledgeTile/components/PledgeTileBack.jsx - About 1 hr to fix

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

                              render() {
                                const { signatures, showPrivateData } = this.props
                            
                                let signeeListOrText
                                if (signatures.length > 0) {
                            Severity: Minor
                            Found in client/app/SigneeList/components/SigneeList.jsx - About 1 hr to fix

                              Function parseDate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                I18n.parseDate = function(date) {
                                  var matches, convertedDate, fraction;
                                  // we have a date, so just return it.
                                  if (typeof(date) == "object") {
                                    return date;
                              Severity: Minor
                              Found in client/vendor/i18n/i18n.js - About 1 hr to fix

                                Method show has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def show
                                    @pledge = Pledge.includes(:initiator).find(params[:id])
                                
                                    authorize @pledge
                                
                                
                                Severity: Minor
                                Found in app/controllers/pledges_controller.rb - About 1 hr to fix

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

                                    render() {
                                      const { formData } = this.props
                                  
                                      return(
                                        <Form {...formData} formObjectClass={SignInFormObject}>
                                  Severity: Minor
                                  Found in client/app/UserSession/components/SignInForm.jsx - About 1 hr to fix

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

                                      render() {
                                        const {
                                          formData, isSubmitting, handleResponse, afterResponse, wasSubmitted
                                        } = this.props
                                    
                                    
                                    Severity: Minor
                                    Found in client/app/Sidebar/components/UpdateForm.jsx - About 1 hr to fix

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

                                        render() {
                                          const {
                                            pledge_id, comments, forms, userCanAskQuestions, userCanAnswer, questionFormId
                                          } = this.props
                                          const { questionForm, answerForm } = forms
                                      Severity: Minor
                                      Found in client/app/CommentList/components/PledgeCommentList.jsx - About 1 hr to fix

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

                                          render() {
                                            const { pledgeId, activateAction } = this.props
                                        
                                            return (
                                              <div className="c-preview c-preview--draft">
                                        Severity: Minor
                                        Found in client/app/Sidebar/components/PreviewDraft.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language