nelsonic/este

View on GitHub

Showing 94 of 94 total issues

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 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

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      try {
                        return await firebaseAuth().signInWithEmailAndPassword(email, password);
                      } catch (error) {
                        if (messages[error.code]) {
                          throw mapFirebaseErrorToEsteValidationError(error.code);
                    Severity: Major
                    Found in src/common/lib/redux-firebase/actions.js and 1 other location - About 1 hr to fix
                    src/common/lib/redux-firebase/actions.js on lines 174..181

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 60.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                          try {
                            return await firebaseAuth().createUserWithEmailAndPassword(email, password);
                          } catch (error) {
                            if (messages[error.code]) {
                              throw mapFirebaseErrorToEsteValidationError(error.code);
                    Severity: Major
                    Found in src/common/lib/redux-firebase/actions.js and 1 other location - About 1 hr to fix
                    src/common/lib/redux-firebase/actions.js on lines 52..59

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 60.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      constructor() {
                        super();
                        this.onButtonClick = this.onButtonClick.bind(this);
                        this.onTitleClick = this.onTitleClick.bind(this);
                      }
                    Severity: Major
                    Found in src/browser/todos/Todo.react.js and 1 other location - About 1 hr to fix
                    src/native/todos/NewTodo.react.js on lines 35..39

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 60.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      constructor() {
                        super();
                        this.onTextInputEndEditing = this.onTextInputEndEditing.bind(this);
                        this.onSubmitEditing = this.onSubmitEditing.bind(this);
                      }
                    Severity: Major
                    Found in src/native/todos/NewTodo.react.js and 1 other location - About 1 hr to fix
                    src/browser/todos/Todo.react.js on lines 15..19

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 60.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    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 render has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      render() {
                        const { appCssFilename, bodyHtml, googleAnalyticsId, helmet, isProduction } = this.props;
                        const linkStyles = appCssFilename &&
                          <link
                            href={appCssFilename}
                    Severity: Minor
                    Found in src/server/frontend/Html.react.js - About 1 hr to fix

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

                      export default function start(Wrapped) {
                        class Start extends Component {
                      
                          static propTypes = {
                            intl: PropTypes.object.isRequired,
                      Severity: Minor
                      Found in src/common/app/start.js - About 1 hr to fix

                        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

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

                          export default function render(req, res, next) {
                            const memoryHistory = createMemoryHistory(req.originalUrl);
                            const store = configureStore({
                              initialState: createRequestInitialState(req),
                              platformMiddleware: [routerMiddleware(memoryHistory)]
                          Severity: Minor
                          Found in src/server/frontend/render.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language