Showing 128 of 341 total issues
Function getData
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getData (_vnode) {
const vnode = _vnode instanceof Component ? _vnode.vnode : _vnode
const component = vnode.component
let updater: any = null
Function attachEvent
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function attachEvent (
domNode: Element,
eventName: string,
handler: Function
) {
- 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 getData
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getData(keepIdentity) {
var oldData = data
if (!keepIdentity) {
// reset for each tick when !keepIdentity
data = []
Function generateRow
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateRow(object, keepIdentity, counter) {
var nbQueries = Math.floor(Math.random() * 10 + 1)
if (!object) {
object = {}
}
Function RenderRate
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
var RenderRate = function() {
var container = document.createElement('div')
container.id = 'stats'
container.style.cssText =
'width:150px;opacity:0.9;cursor:pointer;position:fixed;right:80px;bottom:0px;'
Function patchNonKeyedChildren
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function patchNonKeyedChildren (
parentDom: Element,
lastChildren,
nextChildren,
context: object,
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
function createElement (
vnode: VirtualNode | VirtualNode[],
isSvg?: boolean,
parentContext?,
parentComponent?
- 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 mountComponent
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function mountComponent (
vnode: FullComponent,
parentContext: ParentContext,
parentComponent
) {
Function detachEvent
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function detachEvent (
domNode: Element,
eventName: string,
handler: Function
) {
- 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 lis
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lis (a: number[]): number[] {
const p = a.slice()
const result: number[] = []
result.push(0)
let u: number
Function attachEvent
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function attachEvent (
domNode: Element,
eventName: string,
handler: Function
) {
Function mount
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
mount (vnode) {
this.instMap.set(getInstance(vnode), vnode)
const data = getData(vnode)
const work = [
Function extend
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const extend = ((): (<S, F>(source: S, from: F) => S | F & S) => {
if ('assign' in Object) {
return <S, F>(source: S, from: F): S | F & S => {
if (!from) {
return source
- 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 renderStylesToString
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function renderStylesToString (styles: string | object): string {
if (isString(styles)) {
return styles
} else {
let renderedString = ''
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
function createElement<T> (
type: string | Function | Component<any, any>,
properties?: T & Props | null,
..._children: Array<VirtualChildren | 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 mergeNoDupes
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function mergeNoDupes (previous: any, current: any) {
if (!isUndefined(current)) {
if (!previous) {
previous = {}
}
- 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 patchArrayChildren
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function patchArrayChildren (
parentDom: Element,
lastChildren,
nextChildren,
context: object,
Function createClass
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function createClass<P, S> (
obj: ComponentSpec<P, S>
): ClassicComponentClass<P, S> {
class BoundClass extends Component<P, S> {
static defaultProps
Function collateMixins
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function collateMixins (mixins: Function[] | any[], keyed = {}): any {
for (let i = 0, len = mixins.length; i < len; i++) {
const mixin = mixins[i]
if (mixin.mixins) {
- 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 patchArrayChildren
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function patchArrayChildren (
parentDom: Element,
lastChildren,
nextChildren,
context: object,
- 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"