rofrischmann/inline-style-prefixer

View on GitHub

Showing 161 of 397 total issues

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

    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

    Consider simplifying this complex logical expression.
    Open

      if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && browserName === 'ie' && browserVersion === 10) {
        delete requiresPrefix[property];
    
        if (!keepUnprefixed && !Array.isArray(style[property])) {
          delete style[property];
    Severity: Major
    Found in benchmark/packages/300/dynamic/plugins/flexboxIE.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

        if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && browser === 'ie' && version == 10) {
          if (!keepUnprefixed && !Array.isArray(styles[property])) {
            delete styles[property];
          }
          if (property === 'display' && alternativeValues[value]) {
      Severity: Major
      Found in benchmark/packages/205/plugins/flexboxIE.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

          if (property === 'cursor' && grabValues[value] && (browserName === 'firefox' || browserName === 'chrome' || browserName === 'safari' || browserName === 'opera')) {
            return (0, _getPrefixedValue2.default)(cssPrefix + value, value, keepUnprefixed);
          }
        Severity: Major
        Found in benchmark/packages/302/dynamic/plugins/cursor.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

            if (property === 'cursor' && grabValues[value] && (browserName === 'firefox' || browserName === 'chrome' || browserName === 'safari' || browserName === 'opera')) {
              return (0, _getPrefixedValue2.default)(cssPrefix + value, value, keepUnprefixed);
            }
          Severity: Major
          Found in benchmark/packages/300/dynamic/plugins/cursor.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

              if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) {
                return {
                  cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
                };
              }
            Severity: Major
            Found in benchmark/packages/205/plugins/grabCursor.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                if ((alternativeProps.hasOwnProperty(property) || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && browserName === 'ie' && browserVersion === 10) {
                  delete requiresPrefix[property];
              
                  if (!keepUnprefixed && !Array.isArray(style[property])) {
                    delete style[property];
              Severity: Major
              Found in benchmark/packages/301/dynamic/plugins/flexboxIE.js - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                  if (property === 'cursor' && grabValues[value] && (browserName === 'firefox' || browserName === 'chrome' || browserName === 'safari' || browserName === 'opera')) {
                    return (0, _getPrefixedValue2.default)(cssPrefix + value, value, keepUnprefixed);
                  }
                Severity: Major
                Found in benchmark/packages/301/dynamic/plugins/cursor.js - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                    if ((alternativeProps.hasOwnProperty(property) || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && browserName === 'ie' && browserVersion === 10) {
                      delete requiresPrefix[property];
                  
                      if (!keepUnprefixed && !Array.isArray(style[property])) {
                        delete style[property];
                  Severity: Major
                  Found in benchmark/packages/302/dynamic/plugins/flexboxIE.js - About 40 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/300/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/301/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 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 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 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/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

                              Severity
                              Category
                              Status
                              Source
                              Language