initiatived21/d21

View on GitHub

Showing 63 of 611 total issues

File i18n.js has 570 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// export default class I18n {
//   static set locale(locale) {
//     'yo'
//   }
//
Severity: Major
Found in client/vendor/i18n/i18n.js - About 1 day to fix

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

      render() {
        const {
          onLinkClick, userLoggedIn, form, afterResponse, formId
        } = this.props
    
    
    Severity: Major
    Found in client/app/NewPledge/components/PledgeForm.jsx - About 5 hrs to fix

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

        render() {
          const {
            model, attribute, submodel, errors, value, min, max,
            noLabel, inlineLabel, formId, className
          } = this.props
      Severity: Major
      Found in client/app/Inputs/components/NumberInputComponent.jsx - About 3 hrs to fix

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

          render() {
            const { asSubmodel, labelContent } = this.props
        
            return(
              <div>
        Severity: Major
        Found in client/app/UserForm/components/UserForm.jsx - About 2 hrs to fix

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

            render() {
              const { formData, isSubmitting, handleResponse, afterResponse, isAlreadySigned } = this.props
          
              return isAlreadySigned ? <PledgeSignedMessage /> : (
                <Form
          Severity: Major
          Found in client/app/Sidebar/components/SignPledgeForm.jsx - About 2 hrs to fix

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

              render() {
                const { controls } = this.props
            
                const isOpen = controls ? this.state.isOpen : true
            
            
            Severity: Major
            Found in client/app/NewPledge/components/PledgeFormHelp.jsx - About 2 hrs to fix

              Function strftime has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                I18n.strftime = function(date, format) {
                  var options = this.lookup("date")
                    , meridianOptions = I18n.meridian()
                  ;
              
              
              Severity: Major
              Found in client/vendor/i18n/i18n.js - About 2 hrs to fix

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

                  render() {
                    const { state, initiator, amount, deadline, signatures_count } = this.props
                
                    const remainingDays = daysTill(deadline)
                
                
                Severity: Major
                Found in client/app/PledgeView/components/PledgeData.jsx - About 2 hrs to fix

                  Function mergeProps has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const mergeProps = function(stateProps, dispatchProps, ownProps) {
                    const { originalImage, crop, attrs } = stateProps
                    const {
                      formId, attribute, submodel, scaleToX, scaleToY, aspectRatio,
                      formObjectClass
                  Severity: Major
                  Found in client/app/Inputs/containers/ImageInput.js - About 2 hrs to fix

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

                      render() {
                        const {
                          title, content, amount, who, requirement, location, deadline, locale,
                          description, image, aasm_state, signatures_count, created_at, user, tags
                        } = this.props
                    Severity: Major
                    Found in client/app/PledgeView/components/Pledge.jsx - About 2 hrs to fix

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

                        render() {
                          const { pledge, showControls } = this.props
                          const initiator = pledge.initiator
                          const initiatorName = initiator.organization || initiator.name
                          const avatarUrl = initiator.avatar.url
                      Severity: Minor
                      Found in client/app/PledgeTile/components/PledgeTile.jsx - About 2 hrs to fix

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

                          render() {
                            const {
                              imageState, originalImage, originalImageWidth, originalImageHeight, filename,
                              crop, croppedImageUrl, previewArea, onDropFile, handleChangeCrop,
                              handleFinishCrop, onCancelClick, onRemoveFileClick, className, type
                        Severity: Minor
                        Found in client/app/Inputs/components/ImageInputComponent.jsx - About 1 hr to fix

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

                            render() {
                              return (
                                <div className='c-pledge-form'>
                          
                                  <div className="c-pledge-form__group1">
                          Severity: Minor
                          Found in client/app/NewPledge/components/PledgeContentInputs.jsx - About 1 hr to fix

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

                              render() {
                                const { pledge, user, forms } = this.props
                            
                                return (
                                  <Provider store={store}>
                            Severity: Minor
                            Found in client/app/PledgeView/components/PledgeView.jsx - About 1 hr to fix

                              Function imageInputs has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export default function imageInputs(state={}, action) {
                                let originalImage, aspect, crop
                              
                                if (state.id !== action.id) {
                                  return state
                              Severity: Minor
                              Found in client/app/lib/reducers/imageInput.js - About 1 hr to fix

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

                                  render() {
                                    const { currentUser, onLoginClick, isVisible, onProfileLinkClick } = this.props
                                
                                    let button
                                    if (currentUser) {
                                Severity: Minor
                                Found in client/app/UserSession/components/Session.jsx - About 1 hr to fix

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

                                    render() {
                                      const { state, remainingDays, urgent } = this.props
                                      const className = `c-pledge-state${urgent ? ' c-pledge-state--urgent' : ''}`
                                  
                                      let stateElement = null
                                  Severity: Minor
                                  Found in client/app/PledgeData/components/PledgeState.jsx - About 1 hr to fix

                                    Function toNumber has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      I18n.toNumber = function(number, options) {
                                        options = this.prepareOptions(
                                            options
                                          , this.lookup("number.format")
                                          , NUMBER_FORMAT
                                    Severity: Minor
                                    Found in client/vendor/i18n/i18n.js - About 1 hr to fix

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

                                        render() {
                                          const { currentUser, onLinkClick } = this.props
                                      
                                          return(
                                            <div>
                                      Severity: Minor
                                      Found in client/app/UserSession/components/LoggedIn.jsx - About 1 hr to fix

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

                                          render() {
                                            const { pledge, avatarPath } = this.props
                                        
                                            const initiator = pledge.initiator
                                            const initiatorName = initiator.organization || initiator.name
                                        Severity: Minor
                                        Found in client/app/SocialMediaCard/components/SocialMediaCard.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language