Showing 80 of 460 total issues
Function connected
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
connected() {
const diameter = 255;
const radius = diameter / 2 - 5;
const center = diameter / 2;
Function setup
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup: function() {
var template = stache(
"{{# for(box of boxes) }}" +
"<div class='box-view'>" +
"<div class='box' id='box-{{ box.number }}' style='{{ box.style }}'>" +
Function connected
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
connected() {
// derive the width
this.width = width(this) - this.firstElementChild.offsetWidth;
this.listenTo(window, "resize", () => {
this.width = width(this) - this.firstElementChild.offsetWidth;
Function state
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
get state(){
if (this.printingReceipt) {
return "printingReceipt";
}
if (this.currentTransaction) {
- 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 state
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
get state(){
if (this.printingReceipt) {
return "printingReceipt";
}
if (this.currentTransaction) {
- 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 createPlaylist
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
createPlaylist() {
const playlistName = prompt("What would you like to name your playlist?");
if (!playlistName) {
return;
}
Function state
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
get state(){
if (this.currentTransaction) {
if (this.currentTransaction.state === "executed") {
return "successfulTransaction";
- 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 getPackageJsonByRelease
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function getPackageJsonByRelease(previousRelease, currentRelease) {
const recentReleaseShas = [];
let latestReleaseSha;
let previousReleaseSha;
Function connected
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
connected() {
const diameter = 255;
const radius = diameter / 2 - 5;
const center = diameter / 2;
Function fetchData
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
() => {
return {
getListData(params) {
return _makeFetchRequest(
_getRequestURLAndMethod(this.url, 'getListData', params),
Function _getRequestURLAndMethod
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _getRequestURLAndMethod(connUrl, requestName, params) {
let url = null;
let method = null;
if (connUrl[requestName]) {
Function getAllReleaseNotes
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function getAllReleaseNotes(updatedDependencies) {
const matchingTags = [];
let releaseNotes = {};
for (let key in updatedDependencies) {
try {
Function fireEventForDropPosition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
fireEventForDropPosition(ev, drop, drag, eventName) {
const dragData = domData.get(drag.element[0], "dragData");
const sortables = $(this.element).children();
for (var i = 0; i < sortables.length; i++) {
Function fireEventForDropPosition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
fireEventForDropPosition: function(ev, drop, drag, eventName) {
const dragData = domData.get(drag.element[0], "dragData");
const sortables = $(this.element).children();
Function fireEventForDropPosition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
fireEventForDropPosition: function(ev, drop, drag, eventName) {
const dragData = domData.get(drag.element[0], "dragData");
const sortables = $(this.element).children();
Function connected
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
connected() {
googleAPI.then(() => {
this.map = new google.maps.Map(this.mapElement, {
zoom: 10,
center: {
Function state
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
get state(){
if (this.currentTransaction) {
if (this.currentTransaction.account) {
if (this.currentTransaction instanceof Deposit) {
- 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 getElementsInRange
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function getElementsInRange(range, wrapNodeName) {
const elements = [];
function addSiblingElement(element) {
// We are going to wrap all text nodes with a span.
- 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 state
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
get state() {
// if printingReceipt
// if a currentTransaction
// and the transaction is executed -> successfulTransaction
// if an account
Function makeEntities
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const makeEntities = function(parentId, depth) {
if (depth > 5) {
return [];
}
// The number of entities to create.
- 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"