rofrischmann/inline-style-prefixer

View on GitHub

Showing 397 of 397 total issues

Function getPrefixedKeyframes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function getPrefixedKeyframes(browserName, browserVersion, cssPrefix) {
  var prefixedKeyframes = 'keyframes';

  if (browserName === 'chrome' && browserVersion < 43 || (browserName === 'safari' || browserName === 'ios_saf') && browserVersion < 9 || browserName === 'opera' && browserVersion < 30 || browserName === 'android' && browserVersion <= 4.4 || browserName === 'and_uc') {
    return cssPrefix + prefixedKeyframes;
Severity: Minor
Found in benchmark/packages/300/utils/getPrefixedKeyframes.js - About 55 mins 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 default has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

exports.default = function (_ref) {
  var browser = _ref.browser;
  var version = _ref.version;
  var prefix = _ref.prefix;

Severity: Minor
Found in benchmark/packages/205/utils/getPrefixedKeyframes.js - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    var mozOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (val) {
      return val.match(/-webkit-|-ms-/) === null;
    }).join(',');
Severity: Major
Found in benchmark/packages/300/static/plugins/transition.js and 2 other locations - About 50 mins to fix
benchmark/packages/205/static/plugins/transition.js on lines 41..43
benchmark/packages/300/static/plugins/transition.js on lines 72..74

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

    var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (val) {
      return val.match(/-moz-|-ms-/) === null;
    }).join(',');
Severity: Major
Found in benchmark/packages/300/static/plugins/transition.js and 2 other locations - About 50 mins to fix
benchmark/packages/205/static/plugins/transition.js on lines 41..43
benchmark/packages/300/static/plugins/transition.js on lines 80..82

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

    var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) {
      return value.match(/-moz-|-ms-/) === null;
    }).join(',');
Severity: Major
Found in benchmark/packages/205/static/plugins/transition.js and 2 other locations - About 50 mins to fix
benchmark/packages/300/static/plugins/transition.js on lines 72..74
benchmark/packages/300/static/plugins/transition.js on lines 80..82

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

Avoid deeply nested control flow statements.
Open

          if (versions[browser].x >= browserList[browser]) {
            const property = keywordProperties[i]

            if (!prefixMap[property]) {
              prefixMap[property] = []
Severity: Major
Found in modules/generator/generatePrefixMap.js - About 45 mins to fix

    Function calc has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    function calc(_ref) {
      var property = _ref.property;
      var value = _ref.value;
      var _ref$browserInfo = _ref.browserInfo;
      var browser = _ref$browserInfo.browser;
    Severity: Minor
    Found in benchmark/packages/205/plugins/calc.js - About 45 mins 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 calc has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    function calc(property, value, style, _ref) {
      var browserName = _ref.browserName,
          browserVersion = _ref.browserVersion,
          cssPrefix = _ref.cssPrefix,
          keepUnprefixed = _ref.keepUnprefixed;
    Severity: Minor
    Found in benchmark/packages/301/dynamic/plugins/calc.js - About 45 mins 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 calc has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    function calc(property, value, style, _ref) {
      var browserName = _ref.browserName,
          browserVersion = _ref.browserVersion,
          cssPrefix = _ref.cssPrefix,
          keepUnprefixed = _ref.keepUnprefixed;
    Severity: Minor
    Found in benchmark/packages/300/dynamic/plugins/calc.js - About 45 mins 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 calc has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    function calc(property, value, style, _ref) {
      var browserName = _ref.browserName,
          browserVersion = _ref.browserVersion,
          cssPrefix = _ref.cssPrefix,
          keepUnprefixed = _ref.keepUnprefixed;
    Severity: Minor
    Found in benchmark/packages/302/dynamic/plugins/calc.js - About 45 mins 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

    Avoid deeply nested control flow statements.
    Open

              if (!prefixMap[property]) {
                prefixMap[property] = [];
              }
    Severity: Major
    Found in benchmark/packages/700/generator/generatePrefixMap.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                if (prefixMap[property].indexOf(prefix) === -1) {
                  prefixMap[property].push(prefix);
                }
      Severity: Major
      Found in benchmark/packages/700/generator/generatePrefixMap.js - About 45 mins to fix

        Function zoomCursor has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        function zoomCursor(_ref) {
          var property = _ref.property;
          var value = _ref.value;
          var _ref$browserInfo = _ref.browserInfo;
          var browser = _ref$browserInfo.browser;
        Severity: Minor
        Found in benchmark/packages/205/plugins/zoomCursor.js - About 45 mins 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 flexboxOld has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        function flexboxOld(property, value) {
          if (property === 'flexDirection' && typeof value === 'string') {
            return {
              WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal',
              WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal'
        Severity: Minor
        Found in benchmark/packages/205/static/plugins/flexboxOld.js - About 45 mins 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

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

        var alternativeProps = {
          alignContent: 'msFlexLinePack',
          alignSelf: 'msFlexItemAlign',
          alignItems: 'msFlexAlign',
          justifyContent: 'msFlexPack',
        Severity: Minor
        Found in benchmark/packages/700/plugins/flexboxIE.js and 1 other location - About 40 mins to fix
        modules/plugins/flexboxIE.js on lines 7..16

        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

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

        function flexboxIE(property, value, style) {
          if (alternativeProps.hasOwnProperty(property)) {
            style[alternativeProps[property]] = alternativeValues[value] || value;
          }
        }
        Severity: Minor
        Found in benchmark/packages/302/static/plugins/flexboxIE.js and 1 other location - About 40 mins to fix
        benchmark/packages/301/static/plugins/flexboxIE.js on lines 24..28

        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

            if (property === 'display' && alternativeValues[value]) {
              return {
                display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed)
              };
            }
        Severity: Minor
        Found in benchmark/packages/205/plugins/flexboxOld.js and 1 other location - About 40 mins to fix
        benchmark/packages/205/plugins/flexboxIE.js on lines 49..53

        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

            if (property === 'display' && alternativeValues[value]) {
              return {
                display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed)
              };
            }
        Severity: Minor
        Found in benchmark/packages/205/plugins/flexboxIE.js and 1 other location - About 40 mins to fix
        benchmark/packages/205/plugins/flexboxOld.js on lines 56..60

        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

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

        const alternativeProps = {
          alignContent: 'msFlexLinePack',
          alignSelf: 'msFlexItemAlign',
          alignItems: 'msFlexAlign',
          justifyContent: 'msFlexPack',
        Severity: Minor
        Found in modules/plugins/flexboxIE.js and 1 other location - About 40 mins to fix
        benchmark/packages/700/plugins/flexboxIE.js on lines 13..23

        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

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

        function flexboxIE(property, value, style) {
          if (alternativeProps.hasOwnProperty(property)) {
            style[alternativeProps[property]] = alternativeValues[value] || value;
          }
        }
        Severity: Minor
        Found in benchmark/packages/301/static/plugins/flexboxIE.js and 1 other location - About 40 mins to fix
        benchmark/packages/302/static/plugins/flexboxIE.js on lines 24..28

        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