Showing 88 of 559 total issues
Function update
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
async update(obj, user) {
if (!obj) {
throw Error(`${this._constants.TITLE} cannot be updated without data`);
}
Function create
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
async create(obj, user) {
if (!obj) {
throw Error(`${this._constants.TITLE} cannot be created without data`);
}
Function create
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
async create(obj, user) {
if (!obj) {
throw Error(`${this._constants.TITLE} cannot be created without data`);
}
Function getRouter
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function getRouter(basePath = '/') {
const router = new VueRouter({
base: basePath,
mode: 'history',
routes: [
Function modifiers
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},
- 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 modifiers
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},
- 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 modifiers
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},
- 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 modifiers
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},
- 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 modifiers
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},
Function modifiers
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},
Function modifiers
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},
Function modifiers
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},
Function constructor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(resourceAccess) {
super();
this._controller = new Controller(resourceAccess);
this._clientName = `comfort-${resourceAccess}`;
this._routes = require('express').Router();
Function constructor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(slug, controller, models) {
this._resourceAccess = `comfort-${slug}`;
this._controller = controller;
this._models = models;
this._routes = require('express').Router();
Function down
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.down = function(knex) {
return knex(`${PREFIX}_note`).del()
.then(() => {
return knex(`${PREFIX}_submission_status`).del();
})
Function updateCurrentStatusCodes
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
async updateCurrentStatusCodes (obj, user){
if (!obj || !Array.isArray(obj)) {
throw Error('Status Codes cannot be updated without data');
}
let trx;
Function updateSubmission
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
async updateSubmission(submissionId, obj, user) {
// update: location, contacts, business
if (!obj) {
throw Error(`${this._constants.TITLE} Submission cannot be updated without data`);
}
Function down
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.down = function(knex) {
return Promise.resolve()
.then(() => {
return knex(`${PREFIX}_settings`).del();
})
Function data
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
data() {
return {
ready: false,
authenticated: false,
userName: null,
Function modifiers
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
static get modifiers() {
return {
orderDescending(builder) {
builder.orderBy('createdAt', 'desc');
},