nelsonic/este

View on GitHub

Showing 35 of 94 total issues

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

export default function makeConfig(options) {
  const {
    isDevelopment
  } = options;

Severity: Major
Found in webpack/makeConfig.js - About 5 hrs to fix

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

    export default function queryFirebase(Wrapped, mapPropsToOptions) {
      return class FirebaseQuery extends Component {
    
        static contextTypes = {
          store: PropTypes.object // Redux store.
    Severity: Major
    Found in src/common/lib/redux-firebase/queryFirebase.js - About 4 hrs to fix

      Function fields has 111 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function fields(Wrapped, options) {
        const {
          path = '',
          fields = [],
          getInitialState
      Severity: Major
      Found in src/common/lib/redux-fields/fields.js - About 4 hrs to fix

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

          render() {
            const { fields, fieldsPageModel } = this.props;
            const { disabled, error } = this.state;
        
            return (
        Severity: Major
        Found in src/browser/fields/FieldsPage.react.js - About 3 hrs to fix

          Function fields has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
          Open

          export default function fields(Wrapped, options) {
            const {
              path = '',
              fields = [],
              getInitialState
          Severity: Minor
          Found in src/common/lib/redux-fields/fields.js - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

            render() {
              const { disabled, fields } = this.props;
              const { forgetPasswordIsShown, recoveryEmailSent } = this.state;
              const legendMessage = forgetPasswordIsShown
                ? messages.passwordRecoveryLegend
          Severity: Major
          Found in src/browser/auth/Email.react.js - About 2 hrs to fix

            File cs.js has 252 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* eslint-disable max-len, quote-props, quotes */
            export default [
              {
                "id": "app.buttons.add",
                "defaultMessage": "Přidat"
            Severity: Minor
            Found in messages/cs.js - About 2 hrs to fix

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

                render() {
                  const { viewer } = this.props;
              
                  return (
                    <header>
              Severity: Minor
              Found in src/browser/app/Header.react.js - About 1 hr to fix

                Function plugins has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    plugins: (() => {
                      const plugins = [
                        new webpack.DefinePlugin({
                          'process.env': {
                            IS_BROWSER: true, // Because webpack is used only for browser code.
                Severity: Minor
                Found in webpack/makeConfig.js - About 1 hr to fix

                  Function configureMiddleware has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function configureMiddleware(initialState, platformDeps, platformMiddleware) {
                    if (!firebaseDeps) {
                      // Lazy init.
                      firebase.initializeApp(initialState.config.firebase);
                      firebaseDeps = {
                  Severity: Minor
                  Found in src/common/configureMiddleware.js - About 1 hr to fix

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

                      render() {
                        const { children, viewer } = this.props;
                        const { displayName, email, photoURL } = viewer;
                    
                        return (
                    Severity: Minor
                    Found in src/browser/me/MePage.react.js - About 1 hr to fix

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

                        render() {
                          const { intl, onRouteChange, viewer } = this.props;
                      
                          return (
                            <ScrollView
                      Severity: Minor
                      Found in src/native/app/Menu.react.js - About 1 hr to fix

                        Function makeConfig has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                        Open

                        export default function makeConfig(options) {
                          const {
                            isDevelopment
                          } = options;
                        
                        
                        Severity: Minor
                        Found in webpack/makeConfig.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

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

                        export default function configureStore(options) {
                          const {
                            initialState,
                            platformDeps = {},
                            platformMiddleware = [],
                        Severity: Minor
                        Found in src/common/configureStore.js - About 1 hr to fix

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

                            render() {
                              const { currentLocale, locales, setCurrentLocale } = this.props;
                          
                              return (
                                <CenteredView>
                          Severity: Minor
                          Found in src/native/intl/IntlPage.react.js - About 1 hr to fix

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

                                createArgs(eventTypes = {}) {
                                  // eventTypes.all is shorthand for all granular Firebase events.
                                  if (eventTypes.all) {
                                    // Make a shallow copy to prevent original eventTypes modifications.
                                    eventTypes = { ...eventTypes };
                            Severity: Minor
                            Found in src/common/lib/redux-firebase/queryFirebase.js - About 1 hr to fix

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

                                render() {
                                  // To remember beloved −123 min. https://www.youtube.com/watch?v=VKOv1I8zKso
                                  const unreadCount = 123;
                              
                                  return (
                              Severity: Minor
                              Found in src/browser/intl/IntlPage.react.js - About 1 hr to fix

                                Function updateList has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export default function updateList(
                                  list,
                                  ItemRecord,
                                  idProp,
                                  args
                                Severity: Minor
                                Found in src/common/lib/redux-firebase/updateList.js - About 1 hr to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function queryFirebase has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export default function queryFirebase(Wrapped, mapPropsToOptions) {
                                  return class FirebaseQuery extends Component {
                                
                                    static contextTypes = {
                                      store: PropTypes.object // Redux store.
                                Severity: Minor
                                Found in src/common/lib/redux-firebase/queryFirebase.js - About 1 hr to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function updateList has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function updateList(
                                  list,
                                  ItemRecord,
                                  idProp,
                                  args
                                Severity: Minor
                                Found in src/common/lib/redux-firebase/updateList.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language