lancetw/react-isomorphic-bundle

View on GitHub

Showing 154 of 3,120 total issues

File postsProvider.js has 639 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import models from 'src/server/db/models'
import hashids from 'src/shared/utils/hashids-plus'
import moment from 'moment'
import {
  sortByOrder,
Severity: Major
Found in src/server/db/dao/posts/postsProvider.js - About 1 day to fix

    File PostComponent.js has 633 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React, { Component, PropTypes } from 'react'
    import ReactDOM from 'react-dom'
    import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
    import {
      Form,
    Severity: Major
    Found in src/shared/components/PostComponent.js - About 1 day to fix

      File PostActions.js has 613 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import LOCAL_PATH from 'shared/utils/localpath'
      import request from 'superagent'
      import jwtDecode from 'jwt-decode'
      import { isArray, clone, compact, isEmpty, each, isFinite } from 'lodash'
      import moment from 'moment'
      Severity: Major
      Found in src/shared/actions/PostActions.js - About 1 day to fix

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

          render () {
            const Translate = require('react-translate-component')
        
            const submitClass = classNames(
              'ui',
        Severity: Major
        Found in src/shared/components/PostComponent.js - About 1 day to fix

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

            render () {
              const Translate = require('react-translate-component')
              const { defaultLocale } = this.props
          
              if (!isEmpty(this.props.post.errors)) {
          Severity: Major
          Found in src/shared/components/PostDetailComponent.js - About 1 day to fix

            File PostDetailComponent.js has 447 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React, { Component, PropTypes } from 'react'
            import GMap from 'shared/components/addon/maps/gmap'
            import { isEmpty } from 'lodash'
            import moment from 'moment'
            import { getFileName, getFileExt, checkImageFile } from 'shared/utils/file-utils'
            Severity: Minor
            Found in src/shared/components/PostDetailComponent.js - About 6 hrs to fix

              Function countPerDayInMonth has 167 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              exports.countPerDayInMonth = function *(year, month) {
                const out = []
                const startDateOut = []
                let _year = year
                let _month = month
              Severity: Major
              Found in src/server/db/dao/posts/postsProvider.js - About 6 hrs to fix

                Function default has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function(app) {
                  app.use(
                    route.get('/sitemap.xml', function*(ctx, next) {
                      try {
                        const location = './sitemap.xml'
                Severity: Major
                Found in src/server/appView.js - About 5 hrs to fix

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

                    render () {
                      const { dispatch, auth } = this.props
                  
                      const Translate = require('react-translate-component')
                  
                  
                  Severity: Major
                  Found in src/shared/components/HeaderComponent.js - About 5 hrs to fix

                    File forms.js has 361 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    const React = require('react')
                    const t = require('tcomb-form/lib')
                    const en = require('tcomb-form/lib/i18n/en')
                    const semantic = require('./semantic-custom')
                    const _T = require('counterpart')
                    Severity: Minor
                    Found in src/shared/utils/forms.js - About 4 hrs to fix

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

                        render () {
                          const Translate = require('react-translate-component')
                      
                          const LoadingClass = classNames(
                            'ui',
                      Severity: Major
                      Found in src/shared/components/ManageComponent.js - About 4 hrs to fix

                        Function update has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          update: [ RestAuth, function *(next) {
                            const body = yield parse(this)
                        
                            const rule = {
                              uid: { type: 'string' },
                        Severity: Major
                        Found in src/server/services/v1/posts.js - About 4 hrs to fix

                          File en.js has 340 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /* eslint-disable max-len */
                          module.exports = {
                            http: {
                              'error': {
                                '401': {
                          Severity: Minor
                          Found in src/shared/i18n/en.js - About 4 hrs to fix

                            File zh-hant-cn.js has 340 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /* eslint-disable max-len */
                            module.exports = {
                              http: {
                                'error': {
                                  '401': {
                            Severity: Minor
                            Found in src/shared/i18n/zh-hant-cn.js - About 4 hrs to fix

                              File zh-hant-tw.js has 340 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /* eslint-disable max-len */
                              module.exports = {
                                http: {
                                  'error': {
                                    '401': {
                              Severity: Minor
                              Found in src/shared/i18n/zh-hant-tw.js - About 4 hrs to fix

                                Function create has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  create: [ RestAuth, function *(next) {
                                    const body = yield parse(this)
                                    const rule = {
                                      uid: { type: 'string' },
                                      type: { type: 'string' },
                                Severity: Major
                                Found in src/server/services/v1/posts.js - About 4 hrs to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                      if (!isEmpty(this.props.post.errors)) {
                                        return (
                                          <main className="
                                            ui centered two column post detail stackable has-header grid container">
                                            <div className="center aligned column">
                                  Severity: Critical
                                  Found in src/shared/components/PostDetailComponent.js - About 4 hrs to fix

                                    File routes.js has 329 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import jwtHelper, { verifyJwt } from './jwt-helper'
                                    import passport from 'koa-passport'
                                    import validate from 'parameter'
                                    import db from 'src/server/db'
                                    import * as AuthActions from 'shared/actions/AuthActions'
                                    Severity: Minor
                                    Found in src/server/routes.js - About 3 hrs to fix

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

                                        render () {
                                          const { items, isFetching } = this.props.collect
                                          const handleChange = ::this.handleChange
                                          const isChecked = ::this.isChecked
                                      
                                      
                                      Severity: Major
                                      Found in src/client/admin/components/widget/MembersTableWidget.js - About 3 hrs to fix

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

                                          render () {
                                            const { items, isFetching } = this.props.collect
                                            const handleChange = ::this.handleChange
                                            const isChecked = ::this.isChecked
                                            const selected = !!this.props.selected
                                        Severity: Major
                                        Found in src/client/admin/components/widget/TableWidget.js - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language