Showing 45 of 46 total issues
File entity.ts
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { keys, reduce, isNil, cloneDeep, difference, forEach, castArray, isUndefined, isNull, defaults, chain, isEqual, mapValues, isObject, isString, isInteger, slice, concat, uniq, reject, transform, isEmpty, without, values } from 'lodash';
import { SequentialEvent } from 'sequential-event';
import { Adapter } from '../adapters';
import AAdapterEntity = Adapter.Base.AAdapterEntity;
- Create a ticketCreate a ticket
Entity
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
export abstract class Entity<TEntity extends IEntityAttributes> extends SequentialEvent {
public get attributes() {
return this.getAttributes();
}
- Create a ticketCreate a ticket
File dataAccessLayer.ts
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { isString, isNumber, map, isNil, Dictionary, chain, castArray, forEach } from 'lodash';
import { Adapter as _Base } from './base';
import AAdapterEntity = _Base.Base.AAdapterEntity;
import AAdapter = _Base.Base.AAdapter;
- Create a ticketCreate a ticket
File adapter.ts
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { pick, assign, isNil, cloneDeep, forOwn, defaults, mapKeys, forEach, isNumber, isDate, chain, isUndefined, Dictionary, invert, first, compact, mapValues } from 'lodash';
import { SequentialEvent } from 'sequential-event';
import { Adapter as _AAdapterEntity } from './entity';
import AAdapterEntity = _AAdapterEntity.Base.AAdapterEntity;
- Create a ticketCreate a ticket
File adapter.ts
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { map, forIn, assign, omit, isArray, isUndefined, isNil, get } from 'lodash';
import { Adapter as _AAdapter } from '../base';
import AAdapter = _AAdapter.Base.AAdapter;
import { Adapter as _WebApiEntity } from './entity';
- Create a ticketCreate a ticket
DataAccessLayer
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
export class DataAccessLayer<
TEntity extends AAdapterEntity = AAdapterEntity,
TAdapter extends AAdapter<TEntity> = AAdapter<TEntity>
> extends SequentialEvent implements IDataSourceQuerier<
TEntity,
- Create a ticketCreate a ticket
AAdapter
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
export abstract class AAdapter<TAdapterEntity extends AAdapterEntity = AAdapterEntity>
extends SequentialEvent
implements IDataSourceQuerier<IEntityAttributes, IEntityProperties> {
public get classEntity() {
return this._classEntity;
- Create a ticketCreate a ticket
File checkTransformer.ts
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { get, isInteger, map, isEmpty, some, isNil, compact, flatten, values, every, chain, assign, defaults, forEach, Dictionary, isString, isNumber, isDate, isBoolean, isObject, isArray, castArray, mapValues, omitBy } from 'lodash';
import { EntityTransformers as EntityTransformers_EntityTransformer } from './entityTransformer';
import EntityTransformer = EntityTransformers_EntityTransformer.AEntityTransformer;
import { PathStack } from './pathStack';
- Create a ticketCreate a ticket
Model
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
export class Model<TEntity extends IEntityAttributes> {
public attributes: { [key: string]: _ModelDescription.FieldDescriptor };
private readonly _dataSources: IDataSourceRegistry;
public modelDesc: _ModelDescription.IModelDescription;
- Create a ticketCreate a ticket
Function applyField
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public applyField(
value: any,
propPath: PathStack | string[],
options: { getProps: boolean } = { getProps: false }
): any {
- Create a ticketCreate a ticket
Function constructor
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public constructor() {
const voidFct = () => {
return;
};
super( {
- Create a ticketCreate a ticket
Function applyField
has a Cognitive Complexity of 17 (exceeds 10 allowed). Consider refactoring. Open
public applyField(
value: any,
propPath: PathStack | string[],
options: { getProps: boolean } = { getProps: false }
): any {
- 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 EFieldType.ARRAY
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[EFieldType.ARRAY](
this: CheckTransformer,
keys: PathStack,
fieldDesc: _ModelDescription.FieldDescriptor.IArrayFieldDescriptor,
values: any[]
- Create a ticketCreate a ticket
Function DefaultQueryTransformerFactory
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const DefaultQueryTransformerFactory: IEventProviderFactory = (
config: any
) => {
/**
* Get the plural name of an endpoint.
- Create a ticketCreate a ticket
Function persist
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async persist( sourceName?: string ): Promise<Set<TEntity>> {
const suffixes = map( this, entity => ( 'orphan' === entity.state ? 'Create' : 'Update' ) );
const _allEmit = partial( allEmit, this );
await _allEmit( 'Persist', 'before' );
await _allEmit( 'Validate', 'before' );
- Create a ticketCreate a ticket
marked
Regular Expression Denial of Service Open
"marked": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.6.0.tgz",
"integrity": "sha512-HduzIW2xApSXKXJSpCipSxKyvMbwRRa/TwMbepmlZziKdH8548WSoDP4SxzulEKjlo8BE39l+2fwJZuRKOln6g==",
"dev": true
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Regular Expression Denial of Service
Overview:
The marked module is vulnerable to a regular expression denial of service. Based on the information published in the public issue, 1k characters can block for around 6 seconds.
Recommendation:
Consider another markdown parser until the issue can be addressed.
marked
Regular Expression Denial of Service Open
"marked": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.4.0.tgz",
"integrity": "sha512-tMsdNBgOsrUophCAFQl0XPe6Zqk/uy9gnue+jIIKhykO51hxyu6uNx7zBPy0+y/WKYVZZMspV9YeXLNdKk+iYw==",
"dev": true
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Regular Expression Denial of Service
Overview:
The marked module is vulnerable to a regular expression denial of service. Based on the information published in the public issue, 1k characters can block for around 6 seconds.
Recommendation:
Consider another markdown parser until the issue can be addressed.
Definition for rule 'jsdoc/require-hyphen-before-param-description' was not found Open
import jscc from 'rollup-plugin-jscc';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsdoc/require-description-complete-sentence' was not found Open
import jscc from 'rollup-plugin-jscc';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsdoc/require-returns-type' was not found Open
import jscc from 'rollup-plugin-jscc';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/