Showing 105 of 412 total issues
Function friendlyPseudoClassPlugin
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function friendlyPseudoClassPlugin(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 render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
benchmarkName,
libraryName,
sampleCount,
Function resolveNamedKeys
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function resolveNamedKeys(style, keys) {
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 createSubscription
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function createSubscription(
renderer,
targetDocument = document
) {
return (change) => {
Function getHeadings
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getHeadings(content) {
const headings = []
const components = {
h2: ({ children }) => (
Function FelaComponentFactory
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function FelaComponentFactory(
createElement,
RendererContext,
FelaTheme
) {
Function createRenderer
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createRenderer = () => {
const plugins = [
unit('px'),
placeholderPrefixer(),
friendlyPsuedo(),
Function embeddedPlugin
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function embeddedPlugin(style, type, renderer, props) {
for (const property in style) {
const value = style[property]
if (property === 'fontFace' && typeof value === 'object') {
Function transformer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function transformer(file, api) {
const j = api.jscodeshift
const importName = getImportName(j, file.source, pkg, component)
Function componentDidUpdate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate() {
const { forceLayout, sampleCount, timeout, type } = this.props;
const { cycle, running } = this.state;
if (running && shouldRecord(cycle, type)) {
- 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 Icon
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Icon = (props) => {
const { css } = useFela()
if (!props.icon) {
return null
Function generateHeadings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateHeadings(file) {
const headings = []
const components = {
h2: ({ children }) => (
Function Page
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function Page() {
const { theme } = useFela()
return (
<>
Function createNode
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function createNode(
attributes,
targetDocument = document,
sortMediaQuery,
styleNodeAttributes
Function generateCacheEntry
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
type,
className,
property,
value,
pseudo = '',
Function createNode
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export default function createNode(
attributes,
targetDocument = document,
sortMediaQuery,
styleNodeAttributes
- 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 validateStyleObject
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function validateStyleObject(
style,
logInvalid,
deleteInvalid,
useCSSLint,
- 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 addUnit
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function addUnit(style, defaultUnit, propertyMap, isUnitlessProperty) {
for (const property in style) {
if (!isUnitlessProperty(property)) {
const cssValue = style[property]
const propertyUnit = propertyMap[property] || defaultUnit
- 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 importantPlugin
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function importantPlugin(style) {
if (!isAnimation(style)) {
for (const property in style) {
const value = style[property]
if (property === 'className') {
- 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 resolveCustomProperty
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function resolveCustomProperty(style, properties) {
for (const property in style) {
const value = style[property]
if (properties.hasOwnProperty(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"