rofrischmann/inline-style-prefixer

View on GitHub

Showing 397 of 397 total issues

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

var alternativeValues = {
  'space-around': 'justify',
  'space-between': 'justify',
  'flex-start': 'start',
  'flex-end': 'end',
Severity: Major
Found in benchmark/packages/302/dynamic/plugins/flexboxOld.js and 3 other locations - About 40 mins to fix
benchmark/packages/205/plugins/flexboxOld.js on lines 16..25
benchmark/packages/300/dynamic/plugins/flexboxOld.js on lines 14..23
benchmark/packages/301/dynamic/plugins/flexboxOld.js on lines 14..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 48.

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

var alternativeProps = {
  alignContent: 'msFlexLinePack',
  alignSelf: 'msFlexItemAlign',
  alignItems: 'msFlexAlign',
  justifyContent: 'msFlexPack',
Severity: Major
Found in benchmark/packages/301/static/plugins/flexboxIE.js and 10 other locations - About 40 mins to fix
benchmark/packages/205/plugins/flexboxIE.js on lines 24..33
benchmark/packages/205/static/plugins/flexboxIE.js on lines 16..25
benchmark/packages/300/dynamic/plugins/flexboxIE.js on lines 23..32
benchmark/packages/300/static/plugins/flexboxIE.js on lines 13..22
benchmark/packages/300/utils/getBrowserInformation.js on lines 35..44
benchmark/packages/301/dynamic/plugins/flexboxIE.js on lines 23..32
benchmark/packages/301/utils/getBrowserInformation.js on lines 35..44
benchmark/packages/302/dynamic/plugins/flexboxIE.js on lines 23..32
benchmark/packages/302/static/plugins/flexboxIE.js on lines 13..22
benchmark/packages/302/utils/getBrowserInformation.js on lines 35..44

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

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

var alternativeProps = {
  alignContent: 'msFlexLinePack',
  alignSelf: 'msFlexItemAlign',
  alignItems: 'msFlexAlign',
  justifyContent: 'msFlexPack',
Severity: Major
Found in benchmark/packages/205/plugins/flexboxIE.js and 10 other locations - About 40 mins to fix
benchmark/packages/205/static/plugins/flexboxIE.js on lines 16..25
benchmark/packages/300/dynamic/plugins/flexboxIE.js on lines 23..32
benchmark/packages/300/static/plugins/flexboxIE.js on lines 13..22
benchmark/packages/300/utils/getBrowserInformation.js on lines 35..44
benchmark/packages/301/dynamic/plugins/flexboxIE.js on lines 23..32
benchmark/packages/301/static/plugins/flexboxIE.js on lines 13..22
benchmark/packages/301/utils/getBrowserInformation.js on lines 35..44
benchmark/packages/302/dynamic/plugins/flexboxIE.js on lines 23..32
benchmark/packages/302/static/plugins/flexboxIE.js on lines 13..22
benchmark/packages/302/utils/getBrowserInformation.js on lines 35..44

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

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

function prefixValue(plugins, property, value, style, metaData) {
Severity: Minor
Found in benchmark/packages/301/utils/prefixValue.js - About 35 mins to fix

    Function prefixValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function prefixValue(plugins, property, value, style, metaData) {
    Severity: Minor
    Found in benchmark/packages/700/utils/prefixValue.js - About 35 mins to fix

      Function prefixValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function prefixValue(plugins, property, value, style, metaData) {
      Severity: Minor
      Found in benchmark/packages/302/utils/prefixValue.js - About 35 mins to fix

        Function prefixValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function prefixValue(plugins, property, value, style, metaData) {
        Severity: Minor
        Found in benchmark/packages/300/utils/prefixValue.js - About 35 mins to fix

          Function prefixValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          export default function prefixValue(plugins, property, value, style, metaData) {
          Severity: Minor
          Found in modules/utils/prefixValue.js - About 35 mins to fix

            Function prefixProperty has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

            function prefixProperty(prefixProperties, property, style) {
              var requiredPrefixes = prefixProperties[property];
            
              if (requiredPrefixes && style.hasOwnProperty(property)) {
                var capitalizedProperty = (0, _capitalizeString2.default)(property);
            Severity: Minor
            Found in benchmark/packages/700/utils/prefixProperty.js - About 35 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 flex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

            function flex(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/flex.js - About 35 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 flex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

            function flex(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/flex.js - About 35 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 prefixProperty has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

            export default function prefixProperty(prefixProperties, property, style) {
              const requiredPrefixes = prefixProperties[property]
            
              if (requiredPrefixes && style.hasOwnProperty(property)) {
                const capitalizedProperty = capitalizeString(property)
            Severity: Minor
            Found in modules/utils/prefixProperty.js - About 35 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 flex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

            function flex(_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/flex.js - About 35 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 flex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

            function flex(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/flex.js - About 35 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

                if (Object.prototype.hasOwnProperty.call(flexShorthandMappings, value)) {
                  style.msFlex = flexShorthandMappings[value]
                  return
                }
            Severity: Minor
            Found in modules/plugins/flexboxIE.js and 1 other location - About 35 mins to fix
            benchmark/packages/700/plugins/flexboxIE.js on lines 39..42

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

            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

              alignSelf: function alignSelf(value, style) {
                if (alignmentValues.indexOf(value) > -1) {
                  style.msGridRowAlign = value;
                }
              },
            Severity: Minor
            Found in benchmark/packages/700/plugins/grid.js and 1 other location - About 35 mins to fix
            benchmark/packages/700/plugins/grid.js on lines 120..124

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

            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

                if (Object.prototype.hasOwnProperty.call(flexShorthandMappings, value)) {
                  style.msFlex = flexShorthandMappings[value];
                  return;
                }
            Severity: Minor
            Found in benchmark/packages/700/plugins/flexboxIE.js and 1 other location - About 35 mins to fix
            modules/plugins/flexboxIE.js on lines 37..40

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

            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

              justifySelf: function justifySelf(value, style) {
                if (alignmentValues.indexOf(value) > -1) {
                  style.msGridColumnAlign = value;
                }
              }
            Severity: Minor
            Found in benchmark/packages/700/plugins/grid.js and 1 other location - About 35 mins to fix
            benchmark/packages/700/plugins/grid.js on lines 26..30

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

            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 too many return statements within this function.
            Open

                  return browserByCanIuseAlias[browser];
            Severity: Major
            Found in benchmark/packages/302/utils/getBrowserInformation.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return
              Severity: Major
              Found in modules/plugins/flexboxIE.js - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language