Showing 116 of 254 total issues
Function handleStripeEvent
has 440 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleStripeEvent(type, stripeObject, cb){
const models = this.app.models
const stripeEvents = {
//Account
Function schema
has 228 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
File StripeService.js
has 524 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint no-console: [0, { allow: ["log","warn", "error"] }] */
'use strict'
const Service = require('trails/service')
const _ = require('lodash')
Function schema
has 204 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 202 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function config
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
Open
static config (app) {
let config = {}
if (app && (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data')) {
config = {
- 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 schema
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function config
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Open
static config (app) {
let config = {}
if (app && (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data')) {
config = {
- 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 schema
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {
Function schema
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static schema (app, Sequelize) {
let schema = {}
if (app.config.database.orm === 'waterline' || app.config.database.orm === 'js-data') {
schema = {
id: {