medialize/ally.js

View on GitHub

Showing 736 of 736 total issues

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

        setTimeout(deferred.callback(function() {
          expect(document.activeElement).to.equal(document.body, 'activeElement');
          _expect('ancestry', 'html body'.split(' '));
        }), 200);
Severity: Minor
Found in test/unit/style.focus-within.test.js and 1 other location - About 45 mins to fix
test/unit/style.focus-within.test.js on lines 56..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 50.

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

  if (parent) {
    return function isChildOf(node) {
      return Boolean(
        includeSelf && node === parent
        || parent.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY
Severity: Minor
Found in src/util/compare-position.js and 1 other location - About 45 mins to fix
src/util/compare-position.js on lines 20..27

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

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

  } else if (element) {
    return function isParentOf(node) {
      return Boolean(
        includeSelf && element === node
        || node.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_CONTAINED_BY
Severity: Minor
Found in src/util/compare-position.js and 1 other location - About 45 mins to fix
src/util/compare-position.js on lines 13..27

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        isValidTabindex(null);
      }).to.throw(TypeError, 'is/valid-tabindex requires valid options.context');
    });
Severity: Major
Found in test/unit/is.valid-tabindex.test.js and 8 other locations - About 40 mins to fix
test/unit/element.blur.test.js on lines 22..26
test/unit/element.disabled.test.js on lines 111..115
test/unit/element.focus.test.js on lines 24..28
test/unit/is.active-element.test.js on lines 22..26
test/unit/is.disabled.test.js on lines 38..42
test/unit/is.native-disabled-supported.test.js on lines 34..38
test/unit/is.shadowed.test.js on lines 21..25
test/unit/is.valid-area.test.js on lines 60..64

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

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

      bdd.it('should react to enter key again', function() {
        simulateKeyDown('enter');
        expect(events).to.deep.equal(['enter']);
      });
Severity: Major
Found in test/unit/when.key.test.js and 4 other locations - About 40 mins to fix
test/unit/when.key.test.js on lines 327..330
test/unit/when.key.test.js on lines 332..335
test/unit/when.key.test.js on lines 414..417
test/unit/when.key.test.js on lines 419..422

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        elementFocus(null);
      }).to.throw(TypeError, 'element/focus requires valid options.context');
    });
Severity: Major
Found in test/unit/element.focus.test.js and 8 other locations - About 40 mins to fix
test/unit/element.blur.test.js on lines 22..26
test/unit/element.disabled.test.js on lines 111..115
test/unit/is.active-element.test.js on lines 22..26
test/unit/is.disabled.test.js on lines 38..42
test/unit/is.native-disabled-supported.test.js on lines 34..38
test/unit/is.shadowed.test.js on lines 21..25
test/unit/is.valid-area.test.js on lines 60..64
test/unit/is.valid-tabindex.test.js on lines 32..36

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

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

      bdd.it('should react to enter key', function() {
        simulateKeyDown('enter');
        expect(events).to.deep.equal(['enter']);
      });
Severity: Major
Found in test/unit/when.key.test.js and 4 other locations - About 40 mins to fix
test/unit/when.key.test.js on lines 327..330
test/unit/when.key.test.js on lines 332..335
test/unit/when.key.test.js on lines 337..340
test/unit/when.key.test.js on lines 419..422

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        isActiveElement(null);
      }).to.throw(TypeError, 'is/active-element requires valid options.context');
    });
Severity: Major
Found in test/unit/is.active-element.test.js and 8 other locations - About 40 mins to fix
test/unit/element.blur.test.js on lines 22..26
test/unit/element.disabled.test.js on lines 111..115
test/unit/element.focus.test.js on lines 24..28
test/unit/is.disabled.test.js on lines 38..42
test/unit/is.native-disabled-supported.test.js on lines 34..38
test/unit/is.shadowed.test.js on lines 21..25
test/unit/is.valid-area.test.js on lines 60..64
test/unit/is.valid-tabindex.test.js on lines 32..36

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        isDisabled(null);
      }).to.throw(TypeError, 'is/disabled requires valid options.context');
    });
Severity: Major
Found in test/unit/is.disabled.test.js and 8 other locations - About 40 mins to fix
test/unit/element.blur.test.js on lines 22..26
test/unit/element.disabled.test.js on lines 111..115
test/unit/element.focus.test.js on lines 24..28
test/unit/is.active-element.test.js on lines 22..26
test/unit/is.native-disabled-supported.test.js on lines 34..38
test/unit/is.shadowed.test.js on lines 21..25
test/unit/is.valid-area.test.js on lines 60..64
test/unit/is.valid-tabindex.test.js on lines 32..36

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        isValidArea(null);
      }).to.throw(TypeError, 'is/valid-area requires valid options.context');
    });
Severity: Major
Found in test/unit/is.valid-area.test.js and 8 other locations - About 40 mins to fix
test/unit/element.blur.test.js on lines 22..26
test/unit/element.disabled.test.js on lines 111..115
test/unit/element.focus.test.js on lines 24..28
test/unit/is.active-element.test.js on lines 22..26
test/unit/is.disabled.test.js on lines 38..42
test/unit/is.native-disabled-supported.test.js on lines 34..38
test/unit/is.shadowed.test.js on lines 21..25
test/unit/is.valid-tabindex.test.js on lines 32..36

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

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

      bdd.it('should react to escape key', function() {
        simulateKeyDown('escape');
        expect(events).to.deep.equal(['escape']);
      });
Severity: Major
Found in test/unit/when.key.test.js and 4 other locations - About 40 mins to fix
test/unit/when.key.test.js on lines 327..330
test/unit/when.key.test.js on lines 332..335
test/unit/when.key.test.js on lines 337..340
test/unit/when.key.test.js on lines 414..417

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        elementDisabled(null);
      }).to.throw(TypeError, 'element/disabled requires valid options.context');
    });
Severity: Major
Found in test/unit/element.disabled.test.js and 8 other locations - About 40 mins to fix
test/unit/element.blur.test.js on lines 22..26
test/unit/element.focus.test.js on lines 24..28
test/unit/is.active-element.test.js on lines 22..26
test/unit/is.disabled.test.js on lines 38..42
test/unit/is.native-disabled-supported.test.js on lines 34..38
test/unit/is.shadowed.test.js on lines 21..25
test/unit/is.valid-area.test.js on lines 60..64
test/unit/is.valid-tabindex.test.js on lines 32..36

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        elementBlur(null);
      }).to.throw(TypeError, 'element/blur requires valid options.context');
    });
Severity: Major
Found in test/unit/element.blur.test.js and 8 other locations - About 40 mins to fix
test/unit/element.disabled.test.js on lines 111..115
test/unit/element.focus.test.js on lines 24..28
test/unit/is.active-element.test.js on lines 22..26
test/unit/is.disabled.test.js on lines 38..42
test/unit/is.native-disabled-supported.test.js on lines 34..38
test/unit/is.shadowed.test.js on lines 21..25
test/unit/is.valid-area.test.js on lines 60..64
test/unit/is.valid-tabindex.test.js on lines 32..36

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

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

      bdd.it('should react to escape key', function() {
        simulateKeyDown('escape');
        expect(events).to.deep.equal(['escape']);
      });
Severity: Major
Found in test/unit/when.key.test.js and 4 other locations - About 40 mins to fix
test/unit/when.key.test.js on lines 327..330
test/unit/when.key.test.js on lines 337..340
test/unit/when.key.test.js on lines 414..417
test/unit/when.key.test.js on lines 419..422

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        isShadowed(null);
      }).to.throw(TypeError, 'is/shadowed requires valid options.context');
    });
Severity: Major
Found in test/unit/is.shadowed.test.js and 8 other locations - About 40 mins to fix
test/unit/element.blur.test.js on lines 22..26
test/unit/element.disabled.test.js on lines 111..115
test/unit/element.focus.test.js on lines 24..28
test/unit/is.active-element.test.js on lines 22..26
test/unit/is.disabled.test.js on lines 38..42
test/unit/is.native-disabled-supported.test.js on lines 34..38
test/unit/is.valid-area.test.js on lines 60..64
test/unit/is.valid-tabindex.test.js on lines 32..36

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

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

    bdd.it('should handle invalid input', function() {
      expect(function() {
        isNativeDisabledSupported(null);
      }).to.throw(TypeError, 'is/native-disabled-supported requires valid options.context');
    });
Severity: Major
Found in test/unit/is.native-disabled-supported.test.js and 8 other locations - About 40 mins to fix
test/unit/element.blur.test.js on lines 22..26
test/unit/element.disabled.test.js on lines 111..115
test/unit/element.focus.test.js on lines 24..28
test/unit/is.active-element.test.js on lines 22..26
test/unit/is.disabled.test.js on lines 38..42
test/unit/is.shadowed.test.js on lines 21..25
test/unit/is.valid-area.test.js on lines 60..64
test/unit/is.valid-tabindex.test.js on lines 32..36

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

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

      bdd.it('should react to enter key', function() {
        simulateKeyDown('enter');
        expect(events).to.deep.equal(['enter']);
      });
Severity: Major
Found in test/unit/when.key.test.js and 4 other locations - About 40 mins to fix
test/unit/when.key.test.js on lines 332..335
test/unit/when.key.test.js on lines 337..340
test/unit/when.key.test.js on lines 414..417
test/unit/when.key.test.js on lines 419..422

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

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

  (window.setImmediate || window.setTimeout)(function() {
    // keyup without prior keydown
    // (may happen on CMD+R)
    _activeKeys = Math.max(_activeKeys - 1, 0);
  });
Severity: Minor
Found in src/observe/interaction-type.js and 1 other location - About 40 mins to fix
src/observe/interaction-type.js on lines 63..67

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

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

      return this.remote
        .execute('window.events.length = 0')
        .pressKeys([keys.SHIFT, keys.TAB])
        .pressKeys(keys.NULL)
        .execute('return window.events[1]')
Severity: Minor
Found in test/functional/prepare.js and 1 other location - About 40 mins to fix
test/functional/prepare.js on lines 31..37

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

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

      {
        id: 'Lcov',
        filename: 'reports/lcov.info',
        watermarks: {
          statements: [ 50, 80 ],
Severity: Minor
Found in test/intern.js and 1 other location - About 40 mins to fix
test/intern.js on lines 50..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 49.

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

Severity
Category
Status
Source
Language