Showing 38 of 75 total issues
Function _onMouseMove
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private _onMouseMove(e: any): boolean {
if (this._isDragging) {
//scroll while drag
if (this._isTouchEvent(e))
e = e.touches.length > 0 ? e.touches[0] : e.changedTouches[0];
- 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 _onMouseMove
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
DashboardComponent.prototype._onMouseMove = function (e) {
if (this._isDragging) {
//scroll while drag
if (this._isTouchEvent(e))
e = e.touches.length > 0 ? e.touches[0] : e.changedTouches[0];
Function 53
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
Function _onMouseMove
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
private _onMouseMove(e: any): boolean {
if (this._isDragging) {
//scroll while drag
if (this._isTouchEvent(e))
e = e.touches.length > 0 ? e.touches[0] : e.changedTouches[0];
Function addStyle
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addStyle(obj, options) {
var styleElement, update, remove;
if (options.singleton) {
var styleIndex = singletonCounter++;
Function exports
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', 'angular-cli'],
plugins: [
Function exports
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function() {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
Function AppComponent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
var AppComponent = (function () {
function AppComponent() {
this.title = 'app works!';
this.widgetsSize = [300, 150];
this.dashboardMargin = 20;
Function exports
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(list, options) {
if(typeof DEBUG !== "undefined" && DEBUG) {
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
}
Function 318
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Function _onMouseUp
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
DashboardComponent.prototype._onMouseUp = function (e) {
if (this._isDragging) {
this._isDragging = false;
this._isScrolling = false;
if (this._currentElement) {
Function _onMouseUp
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private _onMouseUp(e: any): boolean {
if (this._isDragging) {
this._isDragging = false;
this._isScrolling = false;
if (this._currentElement) {
Consider simplifying this complex logical expression. Open
} else if(obj.sourceMap &&
typeof URL === "function" &&
typeof URL.createObjectURL === "function" &&
typeof URL.revokeObjectURL === "function" &&
typeof Blob === "function" &&
Function _positionWidget
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
DashboardComponent.prototype._positionWidget = function (lines, items, index, column, row) {
Function _onMouseUp
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private _onMouseUp(e: any): boolean {
if (this._isDragging) {
this._isDragging = false;
this._isScrolling = false;
if (this._currentElement) {
- 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 75
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: 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
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return 0;