Showing 1,020 of 5,354 total issues
File ast.visitor.ts
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
CustomExpression,
ekAccessBoundary,
ekAccessKeyed,
ekAccessMember,
Function processInstructions
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async processInstructions(instructions: RoutingInstruction[], earlierMatchedInstructions: RoutingInstruction[], navigation: Navigation, coordinator: NavigationCoordinator, configuredRoutePath = ''): Promise<Endpoint[]> {
const router = this.router;
const options = router.configuration.options;
// If there are instructions that aren't part of an already found configured route...
Function stackBlurCanvasRGBA
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function stackBlurCanvasRGBA( canvas, top_x, top_y, width, height, radius )
{
if ( isNaN(radius) || radius < 1 ) return;
radius |= 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 formatProperty
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
export function formatProperty(
ctx: IInspectContext,
value: any,
recurseTimes: number,
key: PropertyKey,
- 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 location-manager.spec.ts
has 417 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IPlatform, resolve } from '@aurelia/kernel';
import { IRouter, IRouterEvents, route } from '@aurelia/router-lite';
import { customElement, IHistory, IWindow } from '@aurelia/runtime-html';
import { assert } from '@aurelia/testing';
import { isNode } from '../util.js';
File validator.spec.ts
has 417 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable mocha/no-sibling-hooks */
import { DI, Class } from '@aurelia/kernel';
import {
ValidationConfiguration,
IValidator,
Consider simplifying this complex logical expression. Open
} else if (typeof configOrPath === 'object') {
const config = configOrPath;
validateRouteConfig(config, '');
const path = ensureArrayOfStrings(config.path ?? Type?.path ?? emptyArray);
Function transition
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async transition(coordinator: NavigationCoordinator): Promise<void> {
const navigatingPrefix = this.router.configuration.options.indicators.viewportNavigating;
this.coordinators.push(coordinator);
// If this isn't the first coordinator, a navigation is already in process...
File computed-observer.spec.ts
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { ComputedObserver, IDirtyChecker, IObserverLocator } from '@aurelia/runtime';
import {
Constructable,
} from '@aurelia/kernel';
import {
Function flush
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public flush(time: number = this._now()): void {
if (__DEV__ && this._tracer.enabled) { this._tracer.enter(this, 'flush'); }
this._flushRequested = false;
this._lastFlush = time;
- 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 target-observers.spec.ts
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
AttributeNSAccessor,
ClassAttributeAccessor,
DataAttributeAccessor,
StyleAttributeAccessor
File repeat.contextual-props.spec.ts
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
noop
} from '@aurelia/kernel';
import {
ValueConverter,
Controller
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
export class Controller<C extends IViewModel = IViewModel> implements IController<C> {
public head: IHydratedController | null = null;
public tail: IHydratedController | null = null;
public next: IHydratedController | null = null;
File template-compiler.au-slot.spec.ts
has 400 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IExpressionParser } from '@aurelia/expression-parser';
import {
BindingMode,
AuSlot,
CustomElement,
Function constructor
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public constructor(options: IAssertionErrorOpts) {
const {
actual,
expected,
message,
- 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 mapEquiv
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
export function mapEquiv(
a: Map<any, any>,
b: Map<any, 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 proxy-observation.ts
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IIndexable, isArray, isMap, isSet } from '@aurelia/kernel';
import { Collection, IConnectable } from './interfaces';
import { rtObjectFreeze, rtSafeString } from './utilities';
import { connecting, currentConnectable, _connectable } from './connectable-switcher';
Function advance
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public advance(ch: string): void {
const { chars, states, skippedStates, result } = this;
let stateToAdd: AnyState<T> | null = null;
let matchCount = 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
File binding-command.ts
has 389 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IExpressionParser } from '@aurelia/expression-parser';
import { Protocol, camelCase, emptyArray, firstDefined, getResourceKeyFor, mergeArrays, resolve, resource, resourceBaseName } from '@aurelia/kernel';
import { defineMetadata, getMetadata } from './utilities-metadata';
import { IAttrMapper } from './attribute-mapper';
import {
RoutingScope
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
export class RoutingScope {
/** @internal */
private static lastId = 0;
public id = ++RoutingScope.lastId;