Showing 1,020 of 5,354 total issues
Function formatRaw
has 249 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function formatRaw(
ctx: IInspectContext,
value: any,
recurseTimes: number,
typedArray?: boolean,
File middleware.spec.ts
has 579 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { skip, take } from "rxjs/operators";
import { assert } from '@aurelia/testing';
import {
MiddlewarePlacement,
Function innerDeepEqual
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
export function innerDeepEqual(
val1: unknown,
val2: unknown,
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 repeater-if-else.spec.ts
has 571 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
CustomElement,
IPlatform,
Aurelia,
} from '@aurelia/runtime-html';
File process-content.spec.ts
has 567 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IContainer, noop, toArray } from '@aurelia/kernel';
import { Aurelia, BindingMode, bindable, CustomElement, customElement, INode, IPlatform, processContent } from '@aurelia/runtime-html';
import { assert, TestContext } from '@aurelia/testing';
import { createSpecFunction, TestExecutionContext as $TestExecutionContext, TestFunction } from '../util.js';
File comparison.ts
has 566 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Significant portion of this code is copy-pasted from the node.js source
// Modifications consist primarily of removing dependencies on v8 natives and adding typings
// Original license:
/*
Function getNonSiblingHooks
has a Cognitive Complexity of 60 (exceeds 5 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++) {
- 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 viewport.spec.ts
has 557 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IRouter, IRouteViewModel, Params, route, Router, ViewportCustomElement } from '@aurelia/router-lite';
import { CustomElement, customElement, IPlatform } from '@aurelia/runtime-html';
import { assert } from '@aurelia/testing';
import { start } from '../_shared/create-fixture.js';
File api.ts
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IWindow } from '@aurelia/runtime-html';
import { DI, IHttpClient, ILogger } from 'aurelia';
// eslint-disable-next-line @typescript-eslint/ban-types
type FuncPropNames<T> = { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T];
File api.ts
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IWindow } from '@aurelia/runtime-html';
import { DI, IHttpClient, ILogger } from 'aurelia';
// eslint-disable-next-line @typescript-eslint/ban-types
type FuncPropNames<T> = { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T];
Function hydrate
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
public hydrate(raw: any): any {
switch (raw.$TYPE) {
case ASTExpressionTypes.AccessMemberExpression: {
const expr: Pick<AST.AccessMemberExpression, 'object' | 'name'> = raw;
return new AST.AccessMemberExpression(this.hydrate(expr.object), expr.name);
- 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 spread.spec.ts
has 538 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Constructable, resolve } from '@aurelia/kernel';
import { BindingMode, CustomAttribute, CustomElement, ICustomElementViewModel, INode, ValueConverter } from '@aurelia/runtime-html';
import { assert, createFixture } from '@aurelia/testing';
describe('3-runtime-html/spread.spec.ts', function () {
File validation-controller.spec.ts
has 538 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { IServiceLocator, newInstanceForScope, resolve } from '@aurelia/kernel';
import { Aurelia, CustomElement, IPlatform, customElement } from '@aurelia/runtime-html';
import { assert, TestContext } from '@aurelia/testing';
import {
IValidationRules,
Function getTestData
has 222 lines of code (exceeds 25 allowed). Consider refactoring. Open
function* getTestData() {
const identityArrTmplt = `<span repeat.for="item of arr | identity">\${item}</span>`;
yield new TestData(
'array mutation - identity VC',
identityArrTmplt,
File template-compiler.primary-bindable.spec.ts
has 534 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Constructable, resolve,
} from '@aurelia/kernel';
import {
assert,
File au-slot.slotted.spec.ts
has 529 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { CustomElement, customElement, slotted } from '@aurelia/runtime-html';
import { assert, createFixture } from '@aurelia/testing';
describe('3-runtime-html/au-slot.slotted.spec.ts', function () {
describe('intitial rendering', function () {
File router.ts
has 520 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable prefer-template */
/**
*
* NOTE: This file is still WIP and will go through at least one more iteration of refactoring, commenting and clean up!
* In its current state, it is NOT a good source for learning about the inner workings and design of the router.
File decorator.spec.ts
has 511 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Subscription } from 'rxjs';
import { pluck, distinctUntilChanged } from "rxjs/operators";
import { customElement, IWindow } from '@aurelia/runtime-html';
File store.spec.ts
has 505 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { skip } from "rxjs/operators";
import {
LogLevel,
PerformanceMeasurement,
File portal.spec.tsx
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable @typescript-eslint/no-unused-expressions */
import { Constructable, IRegistry } from '@aurelia/kernel';
import { CustomElement, Aurelia } from '@aurelia/runtime-html';
import {
assert,