Showing 105 of 412 total issues
Function Dot
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Dot = props => {
const { className, children: styles } = (
<scope className="Dot">
<style jsx>{`
.Dot {
Function hoistStatics
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function hoistStatics(target, source) {
if (typeof source === 'string') {
return target
}
Function feFactory
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function feFactory(createElement, FelaComponent) {
return function fe(type, props = {}, ...children) {
if (props) {
const { css, key, ref, className, ...otherProps } = props
Function _renderStyleToCache
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderStyleToCache(reference, property, value, pseudo, media, support) {
// we remove undefined values to enable
// usage of optional props without side-effects
if (isUndefinedValue(value)) {
renderer.cache[reference] = {
Function renderFn
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderFn = (renderer) => {
if (renderer.devMode && style == null) {
// eslint-disable-next-line no-console
console.warn(
'"FelaComponent" is being rendered without a style prop\nIf all you need is access to theme, try using "FelaTheme" or the "useFela" hook instead'
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
accessibilityLabel,
color,
disabled,
Function renderKeyframe
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderKeyframe(keyframe, props = {}) {
const resolvedKeyframe = keyframe(props, renderer)
const processedKeyframe = processStyleWithPlugins(
renderer,
resolvedKeyframe,
Function rehydrateRules
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function rehydrateRules(
css,
media = '',
support = '',
cache = {},
Function resolveResponsiveValues
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolveResponsiveValues(style, properties, getMediaQueries, props) {
for (const property in style) {
const value = style[property]
// resolve nested styles
Function FelaComponentFactory
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function FelaComponentFactory(
createElement,
RendererContext,
FelaTheme
) {
- 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 RendererProviderFactory
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function RendererProviderFactory(
BaseComponent,
RendererContext,
createElement,
renderChildren,
- 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 hoverMediaPlugin
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function hoverMediaPlugin(style) {
for (const property in style) {
const value = style[property]
if (isPlainObject(value)) {
- 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 resolveResponsiveValues
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function resolveResponsiveValues(style, properties, getMediaQueries, props) {
for (const property in style) {
const value = style[property]
// resolve nested styles
- 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 render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
render() {
let renderer;
const { isEmoji, isEntity, isHashtag, isMention, isMedia, isUrl } = this.props.part;
if (isEmoji || isEntity || isUrl || isMedia) {
- 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 handleError
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
property,
style,
logInvalid,
deleteInvalid,
message,
Function createStyleTagMarkup
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
css,
type,
media = '',
rehydrationIndex = -1,
support = false,
Function _renderStyleToCache
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
_renderStyleToCache(reference, property, value, pseudo, media, support) {
Function simulatePlugin
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function simulatePlugin(style, type, renderer, props) {
if (props.simulate) {
for (const property in style) {
const value = style[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 checkMediaQuery
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function checkMediaQuery(style, mediaQueryMap, aliases) {
for (const property in style) {
const value = style[property]
if (isObject(value)) {
- 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
Avoid deeply nested control flow statements. Open
if (!renderer.cache.hasOwnProperty(cacheReference)) {
renderer._renderStyleToCache(
cacheReference,
processed.property,
processed.value,