tomchentw/react-toastr

View on GitHub

Showing 289 of 289 total issues

Consider simplifying this complex logical expression.
Open

                  if (null != a.wheelStartX) {
                    var e = s.scrollLeft - a.wheelStartX,
                      t = s.scrollTop - a.wheelStartY,
                      n =
                        (t && a.wheelDY && t / a.wheelDY) ||
Severity: Major
Found in docs/build/0.320b8cca.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

              if (
                (e.display.input.setUneditable(s),
                a.insertBefore(s, t.text),
                t.line.gutterClass && (s.className += " " + t.line.gutterClass),
                !e.options.lineNumbers ||
    Severity: Major
    Found in docs/build/0.320b8cca.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                if (
                  ((t = t ? copyObj(t) : {}),
                  (t.value = e.value),
                  !t.tabindex && e.tabIndex && (t.tabindex = e.tabIndex),
                  !t.placeholder && e.placeholder && (t.placeholder = e.placeholder),
      Severity: Major
      Found in docs/build/0.320b8cca.js - About 1 hr to fix

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

                          this.props.onGutterClick &&
                            this.editor.on("gutterClick", function(t, n, r) {
                              e.props.onGutterClick(e.editor, n, r)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 1 other location - About 1 hr to fix
        docs/build/0.320b8cca.js on lines 11086..11089

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

        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

                          this.props.onViewportChange &&
                            this.editor.on("viewportChange", function(t, n, r) {
                              e.props.onViewportChange(e.editor, n, r)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 1 other location - About 1 hr to fix
        docs/build/0.320b8cca.js on lines 11090..11093

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

        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

            function _possibleConstructorReturn(e, t) {
              if (!e)
                throw new ReferenceError(
                  "this hasn't been initialised - super() hasn't been called"
                )
        Severity: Minor
        Found in docs/build/0.320b8cca.js and 1 other location - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11243..11249

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

        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

            function _possibleConstructorReturn(e, t) {
              if (!e)
                throw new ReferenceError(
                  "this hasn't been initialised - super() hasn't been called"
                )
        Severity: Minor
        Found in docs/build/0.320b8cca.js and 1 other location - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 10974..10980

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onKeyDown &&
                            this.editor.on("keydown", function(t, n) {
                              e.props.onKeyDown(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11094..11097
        docs/build/0.320b8cca.js on lines 11098..11101
        docs/build/0.320b8cca.js on lines 11102..11105
        docs/build/0.320b8cca.js on lines 11110..11113
        docs/build/0.320b8cca.js on lines 11114..11117
        docs/build/0.320b8cca.js on lines 11118..11121
        docs/build/0.320b8cca.js on lines 11122..11125
        docs/build/0.320b8cca.js on lines 11126..11129

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onDrop &&
                            this.editor.on("drop", function(t, n) {
                              e.props.onDrop(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11094..11097
        docs/build/0.320b8cca.js on lines 11098..11101
        docs/build/0.320b8cca.js on lines 11102..11105
        docs/build/0.320b8cca.js on lines 11106..11109
        docs/build/0.320b8cca.js on lines 11110..11113
        docs/build/0.320b8cca.js on lines 11114..11117
        docs/build/0.320b8cca.js on lines 11118..11121
        docs/build/0.320b8cca.js on lines 11122..11125

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onBlur &&
                            this.editor.on("blur", function(t, n) {
                              e.props.onBlur(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11094..11097
        docs/build/0.320b8cca.js on lines 11102..11105
        docs/build/0.320b8cca.js on lines 11106..11109
        docs/build/0.320b8cca.js on lines 11110..11113
        docs/build/0.320b8cca.js on lines 11114..11117
        docs/build/0.320b8cca.js on lines 11118..11121
        docs/build/0.320b8cca.js on lines 11122..11125
        docs/build/0.320b8cca.js on lines 11126..11129

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onKeyPress &&
                            this.editor.on("keypress", function(t, n) {
                              e.props.onKeyPress(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11094..11097
        docs/build/0.320b8cca.js on lines 11098..11101
        docs/build/0.320b8cca.js on lines 11102..11105
        docs/build/0.320b8cca.js on lines 11106..11109
        docs/build/0.320b8cca.js on lines 11110..11113
        docs/build/0.320b8cca.js on lines 11118..11121
        docs/build/0.320b8cca.js on lines 11122..11125
        docs/build/0.320b8cca.js on lines 11126..11129

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onDragEnter &&
                            this.editor.on("dragenter", function(t, n) {
                              e.props.onDragEnter(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11094..11097
        docs/build/0.320b8cca.js on lines 11098..11101
        docs/build/0.320b8cca.js on lines 11102..11105
        docs/build/0.320b8cca.js on lines 11106..11109
        docs/build/0.320b8cca.js on lines 11110..11113
        docs/build/0.320b8cca.js on lines 11114..11117
        docs/build/0.320b8cca.js on lines 11122..11125
        docs/build/0.320b8cca.js on lines 11126..11129

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onUpdate &&
                            this.editor.on("update", function(t, n) {
                              e.props.onUpdate(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11094..11097
        docs/build/0.320b8cca.js on lines 11098..11101
        docs/build/0.320b8cca.js on lines 11106..11109
        docs/build/0.320b8cca.js on lines 11110..11113
        docs/build/0.320b8cca.js on lines 11114..11117
        docs/build/0.320b8cca.js on lines 11118..11121
        docs/build/0.320b8cca.js on lines 11122..11125
        docs/build/0.320b8cca.js on lines 11126..11129

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onKeyUp &&
                            this.editor.on("keyup", function(t, n) {
                              e.props.onKeyUp(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11094..11097
        docs/build/0.320b8cca.js on lines 11098..11101
        docs/build/0.320b8cca.js on lines 11102..11105
        docs/build/0.320b8cca.js on lines 11106..11109
        docs/build/0.320b8cca.js on lines 11114..11117
        docs/build/0.320b8cca.js on lines 11118..11121
        docs/build/0.320b8cca.js on lines 11122..11125
        docs/build/0.320b8cca.js on lines 11126..11129

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onDragOver &&
                            this.editor.on("dragover", function(t, n) {
                              e.props.onDragOver(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11094..11097
        docs/build/0.320b8cca.js on lines 11098..11101
        docs/build/0.320b8cca.js on lines 11102..11105
        docs/build/0.320b8cca.js on lines 11106..11109
        docs/build/0.320b8cca.js on lines 11110..11113
        docs/build/0.320b8cca.js on lines 11114..11117
        docs/build/0.320b8cca.js on lines 11118..11121
        docs/build/0.320b8cca.js on lines 11126..11129

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

        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 9 locations. Consider refactoring.
        Open

                          this.props.onFocus &&
                            this.editor.on("focus", function(t, n) {
                              e.props.onFocus(e.editor, n)
                            }),
        Severity: Major
        Found in docs/build/0.320b8cca.js and 8 other locations - About 55 mins to fix
        docs/build/0.320b8cca.js on lines 11098..11101
        docs/build/0.320b8cca.js on lines 11102..11105
        docs/build/0.320b8cca.js on lines 11106..11109
        docs/build/0.320b8cca.js on lines 11110..11113
        docs/build/0.320b8cca.js on lines 11114..11117
        docs/build/0.320b8cca.js on lines 11118..11121
        docs/build/0.320b8cca.js on lines 11122..11125
        docs/build/0.320b8cca.js on lines 11126..11129

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

        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 runMode has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              function runMode(e, t, n, r, o, i, a) {
        Severity: Major
        Found in docs/build/0.320b8cca.js - About 50 mins to fix

          Function coordsBidiPart has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                function coordsBidiPart(e, t, n, r, o, i, a) {
          Severity: Major
          Found in docs/build/0.320b8cca.js - About 50 mins to fix

            Function coordsBidiPartWrapped has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  function coordsBidiPartWrapped(e, t, n, r, o, i, a) {
            Severity: Major
            Found in docs/build/0.320b8cca.js - About 50 mins to fix

              Function buildToken has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    function buildToken(e, t, n, r, o, i, l) {
              Severity: Major
              Found in docs/build/0.320b8cca.js - About 50 mins to fix
                Severity
                Category
                Status
                Source
                Language