tomchentw/react-toastr

View on GitHub

Showing 289 of 289 total issues

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

  handleOnClick = event => {
    this.props.onClick(event)
    if (this.props.tapToDismiss) {
      this.handleHide(true)
    }
Severity: Minor
Found in src/components/ToastMessage/ToastMessagejQuery.jsx and 1 other location - About 50 mins to fix
src/components/ToastMessage/ToastMessageAnimated.jsx on lines 152..157

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

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

              ;(d < 0 || (!a.inclusiveLeft && !d)) &&
                u.push({ from: c.from, to: s.from }),
Severity: Minor
Found in docs/build/0.320b8cca.js and 1 other location - About 50 mins to fix
docs/build/0.320b8cca.js on lines 494..495

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

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.vert.firstChild.style.height =
            Math.max(0, e.scrollHeight - e.clientHeight + o) + "px"
Severity: Minor
Found in docs/build/0.320b8cca.js and 1 other location - About 50 mins to fix
docs/build/0.320b8cca.js on lines 6492..6493

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

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

          V(e.scroller, "paste", function(t) {
            eventInWidget(e, t) ||
              signalDOMEvent(r, t) ||
              ((r.state.pasteIncoming = !0), n.focus())
          }),
Severity: Minor
Found in docs/build/0.320b8cca.js and 1 other location - About 50 mins to fix
docs/build/0.320b8cca.js on lines 8315..8319

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

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

          V(i, "paste", function(e) {
            signalDOMEvent(r, e) ||
              handlePaste(e, r) ||
              ((r.state.pasteIncoming = !0), n.fastPoll())
          }),
Severity: Minor
Found in docs/build/0.320b8cca.js and 1 other location - About 50 mins to fix
docs/build/0.320b8cca.js on lines 8322..8326

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

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

                (p > 0 || (!a.inclusiveRight && !p)) &&
                  u.push({ from: s.to, to: c.to }),
Severity: Minor
Found in docs/build/0.320b8cca.js and 1 other location - About 50 mins to fix
docs/build/0.320b8cca.js on lines 492..493

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

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

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

  handleOnClick = event => {
    this.props.onClick(event)
    if (this.props.tapToDismiss) {
      this.handleHide(true)
    }
Severity: Minor
Found in src/components/ToastMessage/ToastMessageAnimated.jsx and 1 other location - About 50 mins to fix
src/components/ToastMessage/ToastMessagejQuery.jsx on lines 138..143

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

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.horiz.firstChild.style.width =
            Math.max(0, e.scrollWidth - e.clientWidth + i) + "px"
Severity: Minor
Found in docs/build/0.320b8cca.js and 1 other location - About 50 mins to fix
docs/build/0.320b8cca.js on lines 6482..6483

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

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

  "./node_modules/react-styleguidist/loaders/css-loader.js!./node_modules/codemirror/theme/base16-light.css": function(
    e,
    t,
    n
  ) {
Severity: Minor
Found in docs/build/0.320b8cca.js and 1 other location - About 50 mins to fix
docs/build/0.320b8cca.js on lines 11369..11381

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

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

  "./node_modules/react-styleguidist/loaders/css-loader.js!./node_modules/codemirror/lib/codemirror.css": function(
    e,
    t,
    n
  ) {
Severity: Minor
Found in docs/build/0.320b8cca.js and 1 other location - About 50 mins to fix
docs/build/0.320b8cca.js on lines 11382..11394

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

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

      function cursorCoords(e, t, n, r, o, i) {
Severity: Minor
Found in docs/build/0.320b8cca.js - About 45 mins to fix

    Function JSLexical has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            function JSLexical(e, t, n, r, o, i) {
    Severity: Minor
    Found in docs/build/0.320b8cca.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      if (
                        (buildCollapsedSpan(
                          t,
                          (null == p.to ? h + 1 : p.to) - f,
                          p.marker,
      Severity: Major
      Found in docs/build/0.320b8cca.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                        if (l != a) throw new Error("Inconsistent bindings for " + s)
        Severity: Major
        Found in docs/build/0.320b8cca.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                          if (/["'\/]/.test(s)) return
          Severity: Major
          Found in docs/build/0.320b8cca.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            if (!p) {
                              var T = M > L ? m.slice(0, L - f) : m
                              t.addToken(
                                t,
                                T,
            Severity: Major
            Found in docs/build/0.320b8cca.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                              if (h[f].node == p) {
                                e.display.currentWheelTarget = p
                                break e
                              }
              Severity: Major
              Found in docs/build/0.320b8cca.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                for (var s = 0; s < i.electricChars.length; s++)
                                  if (t.indexOf(i.electricChars.charAt(s)) > -1) {
                                    a = indentLine(e, o.head.line, "smart")
                                    break
                                  }
                Severity: Major
                Found in docs/build/0.320b8cca.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  for (var S = 0; S < b.length; S += 2)
                                    b[S + 1] == v && (c += " " + b[S])
                  Severity: Major
                  Found in docs/build/0.320b8cca.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    for (var k = 0; k < y.length; ++k)
                                      buildCollapsedSpan(t, 0, y[k])
                    Severity: Major
                    Found in docs/build/0.320b8cca.js - About 45 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language