Showing 20 of 43 total issues
Function e3Extent
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export function e3Extent(params, hash) {
let arr = params[0];
if(!arr) {
return [-Infinity, Infinity];
- 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 d3_svg_lineHermite
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_svg_lineHermite(points, tangents) {
if (tangents.length < 1 || (points.length !== tangents.length && points.length !== tangents.length + 2)) {
return points;
}
Function e3Extent
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function e3Extent(params, hash) {
let arr = params[0];
if(!arr) {
return [-Infinity, Infinity];
Function shadowScalesOrdinal
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function shadowScalesOrdinal(range = [0,1], domain = [0,1], options = {}) {
let {banding, outerPadding, padding, sort} = options;
let spaceBetween = 0;
let [r0, r1] = range;
Function processIterableComponent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
processIterableComponent(componentItem, iterableGuids, iterableMap) {
let {component, children, dataState} = componentItem;
let {enter, exit, active} = calculateChanges(dataState, iterableGuids);
let type = this.getType();
componentItem.dataState = active;
Function d3_svg_lineMonotoneTangents
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_svg_lineMonotoneTangents(points) {
var tangents = [],
d,
a,
b,
Function generateState
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateState(stateName, dataContext = null) {
let activeState = get(this, 'activeState');
let data = dataContext || this.getDataContext();
let attrs = this.get('attrs');
Function e3BindScale
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function e3BindScale(params, options) {
let {scaleDifference, data:manualData} = options;
let [scale, key] = params;
if(scale) {
- 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 d3_svg_lineMonotoneTangents
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function d3_svg_lineMonotoneTangents(points) {
var tangents = [],
d,
a,
b,
- 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 range
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function range(start, stop, step) {
if (arguments.length < 3) {
step = 1;
if (arguments.length < 2) {
stop = start;
- 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 e3CalculateChanges
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function e3CalculateChanges(previousArr, newArr) {
let toRemove = Object.create(null);
let additions = [];
let updates = [];
let removals = [];
Function shadowScalesOrdinal
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function shadowScalesOrdinal(range = [0,1], domain = [0,1], options = {}) {
let {banding, outerPadding, padding, sort} = options;
let spaceBetween = 0;
let [r0, r1] = range;
- 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 pathFromCommands
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function pathFromCommands(commands) {
let svgCommands = commands.map((command, i) => {
let name = '';
if (command.length === 2) {
name = i === 0 ? 'M' : 'L';
- 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 mouseMoveEvents
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function mouseMoveEvents(current, previous) {
/*
- #if mouseDownEvent
- dispatch drag on prevMouseDownEvent.setTarget
- Copy the mouseDownEvent from prev to current
- 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 render
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
render(parentContext, type, parentMatrix, cumMatrix, event) {
Function render
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
render(parentContext, type, attrs, parentMatrix, event) {
Function interpolateHash
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function interpolateHash(hashA, hashB, percent) {
let resHash = {};
let key;
// First, interpolate all the keys from hash A.
- 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 d3_svg_lineHermite
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function d3_svg_lineHermite(points, tangents) {
if (tangents.length < 1 || (points.length !== tangents.length && points.length !== tangents.length + 2)) {
return points;
}
- 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 e3ScaleMax
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function e3ScaleMax(params, options = {}) {
let [scale] = params;
let {minus, add} = options;
if(scale && scale.range) {
let maxValue = max.apply(null, scale.range);
- 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 e3ScaleMin
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function e3ScaleMin(params, options) {
let [scale] = params;
let {minus, add} = options;
if(scale && scale.range) {
let minValue = min.apply(null, scale.range);
- 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"