rofrischmann/inline-style-prefixer

View on GitHub

Showing 161 of 397 total issues

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

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

      Avoid too many return statements within this function.
      Open

              return;
      Severity: Major
      Found in benchmark/packages/700/plugins/flexboxIE.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return;
        Severity: Major
        Found in benchmark/packages/700/plugins/flexboxIE.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return browserByCanIuseAlias[browser];
          Severity: Major
          Found in benchmark/packages/300/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

              Avoid too many return statements within this function.
              Open

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

                Function transition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                export default function transition(property, value, style, propertyPrefixMap) {
                  // also check for already prefixed transitions
                  if (typeof value === 'string' && properties.hasOwnProperty(property)) {
                    const outputValue = prefixValue(value, propertyPrefixMap)
                    // if the property is already prefixed
                Severity: Minor
                Found in modules/plugins/transition.js - About 25 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 gridColumn has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  gridColumn: (value, style) => {
                    if (isSimplePositionValue(value)) {
                      style.msGridColumn = value
                    } else if (isComplexSpanValue(value)) {
                      const [start, end] = value.split('/')
                Severity: Minor
                Found in modules/plugins/grid.js - About 25 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 transition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                function transition(_ref) {
                  var property = _ref.property;
                  var value = _ref.value;
                  var css = _ref.prefix.css;
                  var requiresPrefix = _ref.requiresPrefix;
                Severity: Minor
                Found in benchmark/packages/205/plugins/transition.js - About 25 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 _createClass has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
                Severity: Minor
                Found in benchmark/packages/301/dynamic/createPrefixer.js - About 25 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 _createClass has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
                Severity: Minor
                Found in benchmark/packages/300/dynamic/createPrefixer.js - About 25 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 _extends has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
                Severity: Minor
                Found in benchmark/packages/700/generator/index.js - About 25 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 gridColumn has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  gridColumn: function gridColumn(value, style) {
                    if (isSimplePositionValue(value)) {
                      style.msGridColumn = value;
                    } else if (isComplexSpanValue(value)) {
                      var _value$split = value.split('/'),
                Severity: Minor
                Found in benchmark/packages/700/plugins/grid.js - About 25 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 gridRow has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  gridRow: function gridRow(value, style) {
                    if (isSimplePositionValue(value)) {
                      style.msGridRow = value;
                    } else if (isComplexSpanValue(value)) {
                      var _value$split3 = value.split('/'),
                Severity: Minor
                Found in benchmark/packages/700/plugins/grid.js - About 25 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 gridRow has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  gridRow: (value, style) => {
                    if (isSimplePositionValue(value)) {
                      style.msGridRow = value
                    } else if (isComplexSpanValue(value)) {
                      const [start, end] = value.split('/')
                Severity: Minor
                Found in modules/plugins/grid.js - About 25 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 _createClass has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
                Severity: Minor
                Found in benchmark/packages/302/dynamic/createPrefixer.js - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
                Open

                exports.default = function (userAgent) {
                  if (!userAgent) {
                    return false;
                  }
                  var info = _bowser2.default._detect(userAgent);
                Severity: Minor
                Found in benchmark/packages/205/utils/getBrowserInformation.js - About 25 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