Showing 15 of 26 total issues
Function addOn
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
const addOn = function(renderer: Renderer): void {
// Setting the cache outside this function may result in more persistant but unexpected behaviors
createCache(renderer, 'cache')
const objectToClassNames = (
- 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 addOn
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const addOn = function(renderer: Renderer): void {
createCache(renderer, 'cache')
createCache(renderer, 'kcache')
renderer.hydrate = function(sh) {
- 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 addOn
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const addOn = function (renderer) {
// Setting the cache outside this function may result in more persistant but unexpected behaviors
renderer.cache = {}
// This can should be used for validating against 1) Rules generated with virtua()/atomic() 2) Rules received from hydration()
- 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 addOn
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const addOn = function (renderer) {
// Setting the cache outside this function may result in more persistant but unexpected behaviors
const cache = {}
// This can should be used for validating against 1) Rules generated with virtua()/atomic() 2) Rules received from hydration()
- 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 addOn
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addOn = function(renderer: Renderer): void {
// Setting the cache outside this function may result in more persistant but unexpected behaviors
createCache(renderer, 'cache')
const objectToClassNames = (
Function create
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const create = function (config: Renderer): Renderer {
const renderer = {
raw: '',
pfx: '',
client: isBrowser,
- 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 addOn
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addOn = function (renderer) {
// Setting the cache outside this function may result in more persistant but unexpected behaviors
renderer.cache = {}
// This can should be used for validating against 1) Rules generated with virtua()/atomic() 2) Rules received from hydration()
Function addOn
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addOn = function (renderer) {
// Setting the cache outside this function may result in more persistant but unexpected behaviors
const cache = {}
// This can should be used for validating against 1) Rules generated with virtua()/atomic() 2) Rules received from hydration()
Function create
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
const create = function (config: Renderer): Renderer {
const renderer = {
raw: '',
pfx: '',
client: isBrowser,
Function addOn
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addOn = function(renderer: Renderer): void {
createCache(renderer, 'cache')
createCache(renderer, 'kcache')
renderer.hydrate = function(sh) {
Function createComponent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const createComponent = (
Tag: Tag,
callback: (props: object) => object,
name,
renderer: Renderer
- 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 objectToClassNames
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
const objectToClassNames = (
decls: object,
selector = '',
atRule = ''
): ClassName => {
Function objectToClassNames
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const objectToClassNames = (decls, selector = '', atRule = '') => {
let classNames = ''
for (const prop in decls) {
const value = decls[prop]
const id = `${atRule}${selector}${prop}${value}`
Function objectToClassNames
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const objectToClassNames = (decls, selector = '', atRule = '') => {
let classNames = ''
for (const prop in decls) {
const value = decls[prop]
const id = `${atRule}${selector}${prop}${value}`
Function addOn
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const addOn = function(renderer: Renderer, config = defaultConfig): void {
createCache(renderer, 'kcache')
const { prefixes } = config
- 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"