Showing 362 of 1,897 total issues
Function __argsVN
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const __argsVN = (args: any[]) => {
const attr = __argAttribs(args);
return args.length
? args.length === 2
? [args[0], args[1], attr]
- Read upRead up
- Create a ticketCreate a ticket
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 __equivSet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const __equivSet = (a: Set<any>, b: any) => {
if (a === b) {
return true;
}
if (!(b instanceof Set) || a.size !== b.size) {
- Read upRead up
- Create a ticketCreate a ticket
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 __argAttribs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const __argAttribs = (args: any[]) => {
if (args.length) {
const last = args[args.length - 1];
return isPlainObject(last)
? args.pop()
- Read upRead up
- Create a ticketCreate a ticket
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 indexAt
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
indexAt(t: number) {
const pts = this.points;
const n = pts.length - 1;
if (n < 0) {
return;
- Read upRead up
- Create a ticketCreate a ticket
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 widenInt
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const widenInt = (t: IntType) =>
t === "i8" ? "i16" : t === "i16" ? "i32" : t === "i32" ? "i64" : "i64";
- Read upRead up
- Create a ticketCreate a ticket
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 typedef
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const typedef = (
spec: Field[],
struct: boolean,
buf?: ArrayBuffer | null,
offset = 0,
- Read upRead up
- Create a ticketCreate a ticket
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 bytes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function bytes(cap = 1024, src?: Iterable<BinStructItem>) {
let view: DataView;
let pos = 0;
const ensure = (acc: Uint8Array, size: number) => {
- Read upRead up
- Create a ticketCreate a ticket
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 narrowUint
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const narrowUint = (t: UintType | "u64") =>
t === "u64" ? "u32" : t === "u32" ? "u16" : t === "u16" ? "u8" : "u8";
- Read upRead up
- Create a ticketCreate a ticket
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 narrowInt
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const narrowInt = (t: IntType | "i64") =>
t === "i64" ? "i32" : t === "i32" ? "i16" : t === "i16" ? "i8" : "i8";
- Read upRead up
- Create a ticketCreate a ticket
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 _write
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected _write(x: number, wordSize: number) {
x &= (1 << wordSize) - 1;
let buf = this.buffer;
let pos = this.pos;
let bit = this.bit;
- Read upRead up
- Create a ticketCreate a ticket
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 parseHtml
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const parseHtml = (
src: string,
opts?: Partial<ParseOpts>
): ParseResult => {
if (!src) return { type: "success", result: [] };
- Read upRead up
- Create a ticketCreate a ticket
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 makeRels
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const makeRels = (spec: AncestorDefs) => {
const rels: IObjectOf<Set<PropertyKey>> = {};
for (let k in spec) {
const val = spec[k];
rels[k] =
- Read upRead up
- Create a ticketCreate a ticket
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 extractRange
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
extractRange(start: number, end: number): Maybe<Vec[]> {
if (start > end) {
const t = start;
start = end;
end = t;
- Read upRead up
- Create a ticketCreate a ticket
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 mapVectors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
export function mapVectors(
fn: VecOpVV | VecOpVN | VecOpVVV | VecOpVVN,
out: Vec[] | null,
a: ReadonlyVec[],
b: ReadonlyVec[] | number,
- Read upRead up
- Create a ticketCreate a ticket
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 split
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* split(
src: string,
delim: RegExp | string = /\r?\n/g,
includeDelim = false
) {
- Read upRead up
- Create a ticketCreate a ticket
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 defWorker
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const defWorker = (worker: WorkerSource) =>
worker instanceof Worker
? worker
: isFunction<Fn0<Worker>>(worker)
? worker()
- Read upRead up
- Create a ticketCreate a ticket
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 transclude
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const transclude = <T>(
ctx: SomeRequired<TranscludeCtx<T>, Mandatory>,
path: string
) => {
const $ctx: TranscludeCtx<T> = {
- Read upRead up
- Create a ticketCreate a ticket
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 easeOutBounce
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const easeOutBounce: FnN = (t) =>
t < 1 / 2.75
? 7.5625 * (t * t)
: t < 2 / 2.75
? 7.5625 * (t - 1.5 / 2.75) * (t - 1.5 / 2.75) + 0.75
- Read upRead up
- Create a ticketCreate a ticket
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 slice
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
slice(from = 0, to = this.length) {
let a = from < 0 ? from + this._length : from;
let b = to < 0 ? to + this._length : to;
if (a < 0 || b < 0) {
illegalArgs("invalid indices: ${from} / ${to}");
- Read upRead up
- Create a ticketCreate a ticket
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 easeInOutElastic
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const easeInOutElastic: FnN = (t) =>
t <= 0
? 0
: t >= 1
? 1
- Read upRead up
- Create a ticketCreate a ticket
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"