Showing 87 of 247 total issues
Function exports
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = env => [
bundle(env, true),
bundle(env, false),
{
name:`${PROJECT_NAME}-worker`,
- 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 evaluateOp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected static evaluateOp<T>(key: string, object: T, subquery: Array<FilterQuery<T>>): boolean {
let result;
switch (key) {
case '$and':
result = true;
- 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 findDataService
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
findDataService<D, F extends DataService<any, D> = DataService<any, D>>(q: any): F {
let result: F;
if (q === undefined) {
result = undefined;
} else if (typeof q === '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
Function _getServices
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private _getServices(): any[] {
// Serialize this model services to the worker
const services: Service[] = this.options.services || this.model.findAllServices();
const servicesArray: any[] = services.map((service) => {
// Services are wrapped in a proxy. Get prototype
- 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 _convertSingleValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private _convertSingleValue(
sourceObject: any,
typeDescriptor: TypeDescriptor,
knownTypes: Map<string, Serializable<any>>,
memberName: 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
Function createDefinition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
createDefinition(targetUnit: Unit): UnitFunctionDefinition<any, any> {
let newDefinition: UnitFunctionDefinition<any, any>;
// Get base unit
const baseUnitName = Unit.UNIT_BASES.get(this.baseName);
- 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 _updateQueue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private _updateQueue() {
if (this._queue.length !== 0) {
for (const outlet of this.outlets) {
if (this._busyNodes.indexOf(outlet) === -1) {
// Node is not busy - perform push
- 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"