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;
- Read upRead up
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 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;
- Read upRead up
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'
- Read upRead up
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 (property === 'cursor' && grabValues[value] && (browserName === 'firefox' || browserName === 'chrome' || browserName === 'safari' || browserName === 'opera')) {
return (0, _getPrefixedValue2.default)(cssPrefix + value, value, keepUnprefixed);
}
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];
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);
}
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];
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);
}
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]) {
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)
};
}
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];
Function prefixValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function prefixValue(plugins, property, value, style, metaData) {
Function prefixValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function prefixValue(plugins, property, value, style, metaData) {
Function prefixValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function prefixValue(plugins, property, value, style, metaData) {
Function prefixValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function prefixValue(plugins, property, value, style, metaData) {
Function prefixValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function prefixValue(plugins, property, value, style, metaData) {
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);
- Read upRead up
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;
- Read upRead up
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;
- Read upRead up
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)
- Read upRead up
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"