Showing 6 of 6 total issues
File backbone.deepmodel_spec.js
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import assert from 'assert'
import sinon from 'sinon'
import DeepModel from '../lib'
describe('Backbone.DeepModel', () => {
Function exports
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = config => {
const autoWatch = process.argv.indexOf('--auto-watch') >= 0
const settings = {
// base path that will be used to resolve all patterns (eg. files, exclude)
Function config
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function config(production) {
return {
entry: './lib/index.js',
output: {
Function set
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
set(attribute, value, options) {
if (attribute == null) {
return this
}
- 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 set
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set(attribute, value, options) {
if (attribute == null) {
return this
}
TODO found Open
Open
// TODO: Because of "Symbol is not defined", cannot use `for..of`
- Exclude checks