Function traverseAllChildren
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function traverseAllChildren(
children,
nameSoFar,
callback,
bookKeeping
File createElement.js
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
typeNumber,
toWarnDev,
hasSymbol,
REACT_ELEMENT_TYPE,
Function makeProps
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function makeProps(type, config, props, children, len) {
// Remaining properties override existing props
let defaultProps, propName;
for (propName in config) {
if (
- 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 traverseAllChildren
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function traverseAllChildren(
children,
nameSoFar,
callback,
bookKeeping
- 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 createElement
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function createElement(type, config, ...children) {
let props = {},
tag = 5,
key = null,
ref = null,
- 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 ReactElement
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ReactElement(type, tag, props, key, ref, owner) {
var ret = {
type,
tag,
props
Function flattenCb
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function flattenCb(context, child, key, childType) {
if (child === null) {
lastText = null;
return;
}
- 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 ReactElement
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function ReactElement(type, tag, props, key, ref, owner) {
Function makeProps
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function makeProps(type, config, props, children, len) {
Function ReactElement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function ReactElement(type, tag, props, key, ref, owner) {
var ret = {
type,
tag,
props
- 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"