Showing 6 of 20 total issues
File objects.spec.js
has 885 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import chai from 'chai'
import * as F from '../src'
import _ from 'lodash/fp'
chai.expect()
File tree.spec.js
has 636 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import chai from 'chai'
import * as F from '../src'
import _ from 'lodash/fp'
import Promise from 'bluebird'
Function exports
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (config) {
'use strict'
let browsers
let reporters
Function getDocs
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let getDocs = async () => {
let jsDocToJson = _.flow(
_.reject('undocumented'),
_.reject({ kind: 'module' }),
_.reject({ access: 'private' }),
File lens.spec.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import chai from 'chai'
import _ from 'lodash/fp'
import * as F from '../src'
chai.expect()
Function callUnless
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
let callUnless = (check) => (failFn) => (fn) => (x, y) =>
check(x) ? failFn(y) : check(y) ? failFn(x) : fn(x, y)
- 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"