Showing 378 of 1,891 total issues
Function __readFloat
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const __readFloat = (iter: Iterator<number>) => {
let i: IteratorResult<number>;
let x: number;
let acc = "";
while (!(i = iter.next()).done) {
- 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 __outputRaw
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const __outputRaw = async (
opts: OutputSpec,
output: Sharp,
ctx: ImgProcCtx,
outDir: string
- 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 ringGroup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ringGroup = (opts: RingGroupOpts) => {
const { layout, id, value, label, info } = opts;
const n = value.length;
const nested =
opts.horizontal !== 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 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 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 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 __group
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function* __group(
$: Group,
opts?: Partial<AsAxiDrawOpts>
): IterableIterator<DrawCommand> {
const $sampleOpts = __sampleAttribs(opts?.samples, $.attribs);
- 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 equiv
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
equiv(o: any) {
if (this === o) {
return true;
}
if (!(o instanceof Set) || this.size !== o.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 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 __queryFFNPartial
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const __queryFFNPartial: QueryImpl = (res, db: any, s, p) => {
for (let $s in db) {
if ((<FTerm>s)($s)) {
const sval = db[$s];
for (let $p in sval) {
- 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 easeInOutExp2
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const easeInOutExp2: 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"
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 _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 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"
Further reading
Function fromIterable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const fromIterable = <T>(
src: Iterable<T>,
opts: Partial<FromIterableOpts> = {}
) =>
stream<T>((stream) => {
- 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 mergeMap
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const mergeMap = <K, V>(
dest: Map<K, V>,
...maps: Nullable<Map<K, V>>[]
) => {
for (let x of maps) {
- 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"