Showing 495 of 3,424 total issues
File recognizer.spec.ts
has 2171 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ConfigurableRoute,
DefaultRouteRecognizer,
Endpoint,
RecognizedRoute,
File fast-design-token.pw.spec.ts
has 1329 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable @typescript-eslint/no-empty-function */
import type {
css as FASTcss,
FASTElement,
Observable as FASTObservable,
File di.ts
has 1185 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Big thanks to https://github.com/fkleuver and the https://github.com/aurelia/aurelia project
* for the bulk of this code and many of the associated tests.
*/
import { Context, ContextDecorator, ContextEvent, UnknownContext } from "../context.js";
File design-token-node.pw.spec.ts
has 1033 lines of code (exceeds 250 allowed). Consider refactoring. Open
import "./test/fast-element-dom-shim.js";
import type { Subscriber } from "@microsoft/fast-element";
import { Observable } from "@microsoft/fast-element";
import { reactive } from "@microsoft/fast-element/state.js";
import { test } from "@playwright/test";
File named-colors.ts
has 893 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { ColorRGBA64Config } from "./color-rgba-64.js";
/**
* Browser {@link https://www.w3schools.com/colors/colors_names.asp | named colors}.
* @public
File anchored-region.ts
has 878 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { attr, FASTElement, observable, Updates } from "@microsoft/fast-element";
import { Direction, eventResize, eventScroll } from "@microsoft/fast-web-utilities";
import { getDirection } from "../utilities/direction.js";
import { IntersectionService } from "../utilities/intersection-service.js";
import type {
File di.spec.ts
has 736 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Container,
ContainerImpl,
DI,
FactoryImpl,
File repeat.spec.ts
has 703 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { observable } from "../observation/observable.js";
import { RepeatBehavior, RepeatDirective, repeat } from "./repeat.js";
import { expect } from "chai";
import { html } from "./template.js";
import { toHTML } from "../__test__/helpers.js";
File data-grid.ts
has 697 lines of code (exceeds 250 allowed). Consider refactoring. Open
import type { SyntheticViewTemplate, ViewTemplate } from "@microsoft/fast-element";
import {
attr,
FASTElement,
nullableNumberConverter,
File recognizer.ts
has 676 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Route } from "./navigation.js";
import { QueryString } from "./query-string.js";
/**
* @beta
File binding.spec.ts
has 669 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { expect } from "chai";
import { HTMLBindingDirective } from "./html-binding-directive.js";
import { observable } from "../observation/observable.js";
import { html, ViewTemplate } from "./template.js";
import { createTrackableDOMPolicy, toHTML } from "../__test__/helpers.js";
File render.spec.ts
has 662 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { expect } from "chai";
import { customElement, FASTElement } from "../components/fast-element.js";
import { observable } from "../observation/observable.js";
import { Updates } from "../observation/update-queue.js";
import { Fake } from "../testing/fakes.js";
Function parseStringToOpCodes
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
export function parseStringToOpCodes(
/**
* The string to parse
*/
templateString: string,
- 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 picker.ts
has 623 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
attr,
html,
HTMLView,
nullableNumberConverter,
Function FormAssociated
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
export function FormAssociated<T extends ConstructableFormAssociated>(BaseCtor: T): T {
const C = class extends BaseCtor {
/**
* The proxy element - this element serves as the communication layer with the parent form
* when form association is not supported by the browser.
- 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 arrays.ts
has 611 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { emptyArray } from "../platform.js";
import { Notifier, Subscriber, SubscriberSet } from "./notifier.js";
import { Observable } from "./observable.js";
import { Updates } from "./update-queue.js";
File di.integration.spec.ts
has 600 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { DI, Container, inject, Registration, singleton } from "./di.js";
import chai, { expect } from "chai";
import spies from "chai-spies";
import type { ContextDecorator } from "../context.js";
File di.get.spec.ts
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { expect } from "chai";
import {
all,
DI,
Container,
Function reactWrapper
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
export function reactWrapper(
React: any,
registry: CustomElementRegistry = customElements
) {
/**
- 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 compiler.spec.ts
has 586 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { expect } from "chai";
import { customElement, FASTElement } from "../components/fast-element.js";
import { Markup } from './markup.js';
import { css } from "../styles/css.js";
import { createTrackableDOMPolicy, toHTML } from "../__test__/helpers.js";