Showing 112 of 188 total issues
Function getVirtualListeners
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private getVirtualListeners(
eventType: string,
namespace: Array<Scope>,
exact = false,
max?: number
- 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 showReport
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function showReport(status) {
var headerShown = false;
for (var package in status) {
if (status.hasOwnProperty(package) && status[package].increment > 0) {
if (!headerShown) {
- 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 makeSetter
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function makeSetter<T, R>(scope: Scope<T, R>): Setter<T, R> {
if (typeof scope === 'string' || typeof scope === 'number') {
return function lensSet(
state: T | undefined,
childState: R | undefined
- 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 processEvent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function processEvent(args: any) {
const {scheduler, done, currentTime, setTime, timeToRunTo} = args;
const nextEvent = scheduler.peek();
const outOfTime = nextEvent && timeToRunTo && nextEvent.time >= timeToRunTo;
- 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 call
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public call(vnode: VNode | null): VNode {
if (isDocFrag(this.rootElement)) {
return this.wrapDocFrag(vnode === null ? [] : [vnode]);
}
if (vnode === 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
Consider simplifying this complex logical expression. Open
if (
!event.propagationHasBeenStopped &&
dest.scopeChecker.isDirectlyInScope(elm) &&
((sel !== '' && elm.matches(sel)) ||
(sel === '' && elm === rootElement))
Function makeThrottleListener
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
schedule: any,
currentTime: () => number,
period: number,
listener: Listener<any>,
state: any
Function runVirtually
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
scheduler: any,
done: any,
currentTime: () => number,
setTime: any,
timeToRunTo = 0
Function visitEdge
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
graph: dagre.graphlib.Graph,
idTable: IdTable,
inStream: Stream<any>,
operator: InternalProducer,
outStream: Stream<any>,
Function makeAssertEqual
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
timeSource: any,
schedule: any,
currentTime: () => number,
interval: number,
addAssert: any
Function fromEvent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
element: Element | Document,
eventName: string,
useCapture = false,
preventDefault: PreventDefaultOpt = false,
passive = false
Function makeDebounceListener
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
schedule: any,
currentTime: () => number,
debounceInterval: number,
listener: any,
state: any
Function removeElement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public removeElement(element: Element, namespace?: Array<Scope>): void {
if (namespace !== undefined) {
this.virtualListeners.delete(namespace);
}
const toRemove: Array<[string, Element]> = [];
- 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 sinksAreXStream
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function sinksAreXStream(sinks: Object | null): boolean {
if (sinks === null) {
return false;
}
for (const key in sinks) {
- 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 makeGetter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function makeGetter<T, R>(scope: Scope<T, R>): Getter<T, R> {
if (typeof scope === 'string' || typeof scope === 'number') {
return function lensGet(state) {
if (typeof state === 'undefined') {
return void 0;
- 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 makeThrottleAnimation
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function makeThrottleAnimation(
timeSource: any,
schedule: any,
currentTime: () => number
) {
- 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 callDrivers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function callDrivers<D extends Drivers>(
drivers: D,
sinkProxies: SinkProxies<D>
): Sources<D> {
const sources: Sources<D> = {} as Sources<D>;
- 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 _n
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public _n(inst: InternalInstances<Si>): void {
this.inst = inst;
const arrSinks = inst.arr;
const ils = this.ils;
const out = this.out;
- 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 too many return
statements within this function. Open
return h(tagName, a);
Avoid too many return
statements within this function. Open
return;