Showing 1,020 of 5,369 total issues
File state.spec.ts
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { ValueConverter, customAttribute, customElement, ICustomAttributeController, IWindow } from '@aurelia/runtime-html';
import { StateDefaultConfiguration, fromState } from '@aurelia/state';
import { assert, createFixture, onFixtureCreated } from '@aurelia/testing';
describe('state/state.spec.ts', function () {
Function updateNavigation
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
private async updateNavigation(navigation: Navigation): Promise<void> {
// Make sure instructions added not from root scope are properly parented
// up to root scope
(this.rootScope as ViewportScope).scope.reparentRoutingInstructions();
- 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
File custom-elements.harmony.spec.ts
has 350 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { delegateSyntax } from '@aurelia/compat-v1';
import {
CustomAttribute,
CustomElement,
INode,
File computed-observer.spec.ts
has 350 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { DI, IIndexable, IPlatform, Registration } from '@aurelia/kernel';
import {
IDirtyChecker,
IObserverLocator,
INodeObserverLocator,
RoutingInstruction
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
export class RoutingInstruction {
/**
* The component part of the routing instruction.
*/
public component: InstructionComponent;
Function getNonSiblingHooks
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getNonSiblingHooks(deferUntil, swapStrategy, phase, transitionComponents) {
console.log('transitions', JSON.parse(JSON.stringify(transitionComponents)));
const transitions: Transition[] = [];
for (let i = 0; i < transitionComponents.length; i++) {
Function from
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static from(def: CustomAttributeDefinition | null, alias: string): AttrInfo | null {
if (def === null) {
return null;
}
let rec = attrInfoLookup.get(def);
- 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 _finalize
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public _finalize(): boolean {
function collectSkippedStates(
skippedStates: DynamicState<T>[],
state: AnyState<T>,
): void {
- 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
File preprocess.spec.ts
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as path from 'path';
import { preprocess, IFileUnit } from '@aurelia/plugin-conventions';
import { assert } from '@aurelia/testing';
describe('preprocess', function () {
Function compareTo
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public compareTo(b: Candidate<T>): -1 | 1 | 0 {
const statesA = this.states;
const statesB = b.states;
for (let iA = 0, iB = 0, ii = Math.max(statesA.length, statesB.length); iA < ii; ++iA) {
- 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 process
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public static process<T = unknown>(step: Step<T> | null): void {
const root = step!.root;
while (step !== null && !step.isDoing && !step.isDone) {
root.current = step;
if (step.isParallelParent) {
- 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 getHookTestData
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
function* getHookTestData() {
yield {
name: 'a1(canLoad:4)/a2+b1/b2',
a1: createHookTimingConfiguration({ canLoad: 4 }),
a2: createHookTimingConfiguration(),
Function innerDeepEqual
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function innerDeepEqual(
val1: unknown,
val2: unknown,
strict: boolean,
memos?: Memos,
Function $setup
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function $setup(platform: BrowserPlatform): void {
setPlatform(platform);
BrowserPlatform.set(globalThis, platform);
if (typeof window !== 'undefined') window.addEventListener('error', e => console.log(e));
File store.ts
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
import { IContainer, ILogger } from '@aurelia/kernel';
import { IWindow } from "@aurelia/runtime-html";
import { BehaviorSubject, Observable } from 'rxjs';
File ast-serialization.ts
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import * as AST from '@aurelia/expression-parser';
import { ErrorNames, createMappedError } from './errors';
File transition-viewport.ts
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { DeferralJuncture, SwapStrategy } from './create-fixture.js';
import { Component } from './component.js';
import { HookName, MaybeHookName } from './hook-invocation-tracker.js';
import { Transition } from './transition.js';
Function run
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public run(time: number = this.taskQueue.platform.performanceNow()): void {
if (__DEV__ && this._tracer.enabled) { this._tracer.enter(this, 'run'); }
if (this._status !== tsPending) {
if (__DEV__ && this._tracer.enabled) { this._tracer.leave(this, 'run error'); }
- 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 setEquiv
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
export function setEquiv(
a: Set<any>,
b: Set<any>,
strict: boolean,
memos?: Memos,
- 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
File decorator-watch.expression.spec.ts
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { BindingMode, bindable, customAttribute, customElement, watch } from '@aurelia/runtime-html';
import { assert, createFixture, TestContext } from '@aurelia/testing';
describe('3-runtime-html/decorator-watch.expression.spec.ts', function () {
const testCases: ITestCase[] = [