Showing 324 of 527 total issues
Function exports
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((knex) => {
class ContentQueryBuilder {
constructor() {
Function lookup
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
module.exports.lookup = (lackeyPath, projectPath) => {
let fn = (_path, options, callback) => {
if (typeof _path === 'string' && _path.indexOf(',') >= 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
StructureUI
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
class StructureUI extends Emitter {
/**
* Gets template meta data
* @param {string} templatePath
Function exports
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (dust, config) => {
dust.filters.media = function (value) {
var returnString = '';
if (value.mime === 'video/youtube') {
Function print
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
static print(page, fullPath, res, req, preview) {
let
path,
user = req.user,
Function exports
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((ObjectionWrapper, Taxonomy) => {
SCli.debug(__MODULE_NAME, 'READY');
/**
Function exports
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (dust, config) => {
dust.filters.media = function (value) {
var returnString = '';
if (value.mime === 'video/youtube') {
- 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
File index.js
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* jslint esnext:true, node:true */
/* globals LACKEY_PATH */
'use strict';
/*
Function exports
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (socket, config) => {
socket.on('media.start-upload', (data) => {
console.log('media.start-upload', data);
Function exports
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((ObjectionWrapper) => {
SCli.debug(__MODULE_NAME, 'READY');
class AnalyticsModel extends Model {
static get tableName() {
BlockEditor
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class BlockEditor {
constructor(path, template, block) {
debug('Constructor', block);
var self = this;
Function block
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports.block = (config, injectedChunk, context, bodies, params, dust) => {
SCli.debug('lackey-cms/modules/cms/server/lib/dust/block');
if (!config) {
Function exports
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (el, cb) {
var media,
dragdrop,
root = el || document,
callback = cb || function () {},
File wysiwyg.js
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint no-cond-assign:0, no-new:0 */
/* jslint browser:true, node:true, esnext:true */
'use strict';
/*
Copyright 2016 Enigma Marketing Services Limited
Function constructor
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
constructor(element) {
var
self = this;
this._search = lackey.select('[data-lky-hook="table.filter"]')[0];
this._root = element;
- 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
File module-loader.js
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* jslint node:true, esnext:true, no-use-before-define */
/* eslint no-use-before-define:0 */
/* globals LACKEY_PATH */
'use strict';
Function exports
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((Model, Crud) => {
class Controller extends Crud {
static get model() {
return this._overriden('model', Model);
Function print
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
function print(chunk, data, type, editMode, dust, log, config) {
let source;
SCli.debug('lackey-cms/modules/cms/server/lib/dust/media', 'Print', JSON.stringify(data, null, 4));
Function exports
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (el, cb) {
var root = el || document,
callback = cb || function () {};
lackey.bind('[data-lky-hook="action:pick-taxonomy"]', 'click', (event, hook) => {
File crud.injection.js
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* jslint esnext:true, node:true */
/* globals LACKEY_PATH */
'use strict';
/*
Copyright 2016 Enigma Marketing Services Limited