medialize/ally.js

View on GitHub

Showing 736 of 736 total issues

Function createShadowRoot has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function createShadowRoot(fixture) {
    if (!fixture.shadow) {
      fixture.shadow = {};
    }

Severity: Minor
Found in test/helper/fixtures/shadow-input.fixture.js - About 1 hr to fix

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

      src.ally.labelStrict = readableLabel(
        src.ally.focusableStrict,
        src.ally.tabbableStrict,
        src.ally.onlyTabbable,
        src.ally.redirecting,
    Severity: Major
    Found in build/data-tables/utils/aggregated-focusable-data.js and 2 other locations - About 1 hr to fix
    build/data-tables/utils/aggregated-focusable-data.js on lines 190..196
    build/data-tables/utils/aggregated-focusable-data.js on lines 197..203

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

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

        bdd.before(function() {
          var deferred = this.async(10000);
          fixture = focusableFixture();
          // NOTE: Firefox decodes DataURIs asynchronously
          setTimeout(deferred.resolve, 200);
    Severity: Major
    Found in test/unit/is.focus-relevant.test.js and 6 other locations - About 1 hr to fix
    test/unit/is.focusable.test.js on lines 13..18
    test/unit/is.tabbable.test.js on lines 21..26
    test/unit/query.focusable.all.test.js on lines 14..19
    test/unit/query.focusable.strict.test.js on lines 14..19
    test/unit/query.focusable.test.js on lines 15..20
    test/unit/query.tabbable.test.js on lines 14..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 57.

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

      src.ally.labelQuick = readableLabel(
        src.ally.focusableQuick,
        src.ally.tabbableQuick,
        src.ally.onlyTabbable,
        src.ally.redirecting,
    Severity: Major
    Found in build/data-tables/utils/aggregated-focusable-data.js and 2 other locations - About 1 hr to fix
    build/data-tables/utils/aggregated-focusable-data.js on lines 190..196
    build/data-tables/utils/aggregated-focusable-data.js on lines 204..210

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

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

        bdd.beforeEach(function() {
          var deferred = this.async(10000);
          fixture = focusableFixture();
          // NOTE: Firefox decodes DataURIs asynchronously
          setTimeout(deferred.resolve, 200);
    Severity: Major
    Found in test/unit/query.focusable.strict.test.js and 6 other locations - About 1 hr to fix
    test/unit/is.focus-relevant.test.js on lines 13..18
    test/unit/is.focusable.test.js on lines 13..18
    test/unit/is.tabbable.test.js on lines 21..26
    test/unit/query.focusable.all.test.js on lines 14..19
    test/unit/query.focusable.test.js on lines 15..20
    test/unit/query.tabbable.test.js on lines 14..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 57.

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

      src.ally.label = readableLabel(
        src.ally.focusable,
        src.ally.tabbable,
        src.ally.onlyTabbable,
        src.ally.redirecting,
    Severity: Major
    Found in build/data-tables/utils/aggregated-focusable-data.js and 2 other locations - About 1 hr to fix
    build/data-tables/utils/aggregated-focusable-data.js on lines 197..203
    build/data-tables/utils/aggregated-focusable-data.js on lines 204..210

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

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

        bdd.before(function() {
          var deferred = this.async(10000);
          fixture = focusableFixture();
          // NOTE: Firefox decodes DataURIs asynchronously
          setTimeout(deferred.resolve, 200);
    Severity: Major
    Found in test/unit/is.tabbable.test.js and 6 other locations - About 1 hr to fix
    test/unit/is.focus-relevant.test.js on lines 13..18
    test/unit/is.focusable.test.js on lines 13..18
    test/unit/query.focusable.all.test.js on lines 14..19
    test/unit/query.focusable.strict.test.js on lines 14..19
    test/unit/query.focusable.test.js on lines 15..20
    test/unit/query.tabbable.test.js on lines 14..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 57.

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

        bdd.beforeEach(function() {
          var deferred = this.async(10000);
          fixture = focusableFixture();
          // NOTE: Firefox decodes DataURIs asynchronously
          setTimeout(deferred.resolve, 200);
    Severity: Major
    Found in test/unit/query.tabbable.test.js and 6 other locations - About 1 hr to fix
    test/unit/is.focus-relevant.test.js on lines 13..18
    test/unit/is.focusable.test.js on lines 13..18
    test/unit/is.tabbable.test.js on lines 21..26
    test/unit/query.focusable.all.test.js on lines 14..19
    test/unit/query.focusable.strict.test.js on lines 14..19
    test/unit/query.focusable.test.js on lines 15..20

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

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

        bdd.before(function() {
          var deferred = this.async(10000);
          fixture = focusableFixture();
          // NOTE: Firefox decodes DataURIs asynchronously
          setTimeout(deferred.resolve, 200);
    Severity: Major
    Found in test/unit/is.focusable.test.js and 6 other locations - About 1 hr to fix
    test/unit/is.focus-relevant.test.js on lines 13..18
    test/unit/is.tabbable.test.js on lines 21..26
    test/unit/query.focusable.all.test.js on lines 14..19
    test/unit/query.focusable.strict.test.js on lines 14..19
    test/unit/query.focusable.test.js on lines 15..20
    test/unit/query.tabbable.test.js on lines 14..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 57.

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

        bdd.beforeEach(function() {
          var deferred = this.async(10000);
          fixture = focusableFixture();
          // NOTE: Firefox decodes DataURIs asynchronously
          setTimeout(deferred.resolve, 200);
    Severity: Major
    Found in test/unit/query.focusable.all.test.js and 6 other locations - About 1 hr to fix
    test/unit/is.focus-relevant.test.js on lines 13..18
    test/unit/is.focusable.test.js on lines 13..18
    test/unit/is.tabbable.test.js on lines 21..26
    test/unit/query.focusable.strict.test.js on lines 14..19
    test/unit/query.focusable.test.js on lines 15..20
    test/unit/query.tabbable.test.js on lines 14..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 57.

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

        bdd.beforeEach(function() {
          var deferred = this.async(10000);
          fixture = focusableFixture();
          // NOTE: Firefox decodes DataURIs asynchronously
          setTimeout(deferred.resolve, 200);
    Severity: Major
    Found in test/unit/query.focusable.test.js and 6 other locations - About 1 hr to fix
    test/unit/is.focus-relevant.test.js on lines 13..18
    test/unit/is.focusable.test.js on lines 13..18
    test/unit/is.tabbable.test.js on lines 21..26
    test/unit/query.focusable.all.test.js on lines 14..19
    test/unit/query.focusable.strict.test.js on lines 14..19
    test/unit/query.tabbable.test.js on lines 14..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 57.

    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

          bdd.before(function() {
            var container = document.getElementById('details-closed');
            if (container.open === undefined) {
              this.skip('HTML5 details element not supported');
            }
    Severity: Major
    Found in test/unit/is.visible.test.js and 1 other location - About 1 hr to fix
    test/unit/is.visible.test.js on lines 142..147

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

    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

          bdd.before(function() {
            var element = document.getElementById('hidden-div');
            if (element.hidden === undefined) {
              this.skip('HTML5 hidden attribute not supported');
            }
    Severity: Major
    Found in test/unit/is.visible.test.js and 1 other location - About 1 hr to fix
    test/unit/is.visible.test.js on lines 156..161

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

    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

    export default {
      element: 'div',
      mutate: function(element) {
        element.innerHTML = '<map name="image-map-tabindex-test">'
          + '<area shape="rect" coords="63,19,144,45"></map>'
    Severity: Major
    Found in src/supports/focus-area-img-tabindex.js and 1 other location - About 1 hr to fix
    src/supports/focus-img-usemap-tabindex.js on lines 6..15

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

    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

            expect(function() {
              handle = whenKey({
                'enter+shift': function() {},
              });
              handle.disengage();
    Severity: Major
    Found in test/unit/when.key.test.js and 1 other location - About 1 hr to fix
    test/unit/when.key.test.js on lines 106..111

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

    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

            expect(function() {
              handle = whenKey({
                'shaft+enter': function() {},
              });
              handle.disengage();
    Severity: Major
    Found in test/unit/when.key.test.js and 1 other location - About 1 hr to fix
    test/unit/when.key.test.js on lines 99..104

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

    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

    export default {
      element: 'div',
      mutate: function(element) {
        element.innerHTML = '<map name="image-map-tabindex-test"><area href="#void" shape="rect" coords="63,19,144,45"></map>'
          + '<img usemap="#image-map-tabindex-test" tabindex="-1" alt="" '
    Severity: Major
    Found in src/supports/focus-img-usemap-tabindex.js and 1 other location - About 1 hr to fix
    src/supports/focus-area-img-tabindex.js on lines 5..14

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

    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 default has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    export default function(context) {
      const element = contextToElement({
        label: 'element/blur',
        context,
      });
    Severity: Minor
    Found in src/element/blur.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 isVisibleRules has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    function isVisibleRules({
      context,
      except = {
        notRendered: false,
        cssDisplay: false,
    Severity: Minor
    Found in src/is/visible.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 handleFocusEvent has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    function handleFocusEvent(event) {
      let source = '';
      if (event.type === focusEventName || event.type === 'shadow-focus') {
        const interactionType = interactionTypeHandler.get();
        source = lock
    Severity: Minor
    Found in src/style/focus-source.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

    Severity
    Category
    Status
    Source
    Language