Showing 384 of 1,490 total issues
File ganttDb.js
has 606 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { sanitizeUrl } from '@braintree/sanitize-url';
import dayjs from 'dayjs';
import dayjsIsoWeek from 'dayjs/plugin/isoWeek.js';
import dayjsCustomParseFormat from 'dayjs/plugin/customParseFormat.js';
import dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat.js';
Function drawCommits
has 259 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const drawCommits = (svg, commits, modifyGraph) => {
const gitGraphConfig = getConfig().gitGraph;
const gBullets = svg.append('g').attr('class', 'commit-bullets');
const gLabels = svg.append('g').attr('class', 'commit-labels');
let pos = 0;
Function updateColors
has 257 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateColors() {
// The || is to make sure that if the variable has been defined by a user override that value is to be used
/* Main */
this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#eee' : '#333'); // invert(this.primaryColor);
File classTypes.spec.ts
has 572 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { ClassMember } from './classTypes.js';
import { vi, describe, it, expect } from 'vitest';
const spyOn = vi.spyOn;
const staticCssStyle = 'text-decoration:underline;';
File svgDraw.js
has 565 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import common from '../common/common.js';
import * as svgDrawCommon from '../common/svgDrawCommon.js';
import { sanitizeUrl } from '@braintree/sanitize-url';
export const drawRect = function (elem, rectData) {
File sequenceDb.js
has 562 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { getConfig } from '../../diagram-api/diagramAPI.js';
import { log } from '../../logger.js';
import { sanitizeText } from '../common/common.js';
import {
clear as commonClear,
File gitGraphRenderer.js
has 560 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { select } from 'd3';
import { getConfig, setupGraphViewbox } from '../../diagram-api/diagramAPI.js';
import { log } from '../../logger.js';
import utils from '../../utils.js';
File classDiagram-v2.spec.js
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { imgSnapshotTest } from '../../helpers/util.ts';
describe('Class diagram V2', () => {
it('0: should render a simple class diagram', () => {
imgSnapshotTest(
`
File stateDiagram-v2.spec.js
has 545 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
describe('State diagram', () => {
it('v2 should render a simple info', () => {
imgSnapshotTest(
File utils.spec.ts
has 545 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { vi } from 'vitest';
import utils, { calculatePoint, cleanAndMerge, detectDirective } from './utils.js';
import assignWithDepth from './assignWithDepth.js';
import { detectType } from './diagram-api/detectType.js';
import { addDiagrams } from './diagram-api/diagram-orchestration.js';
File quadrantBuilder.ts
has 543 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { scaleLinear } from 'd3';
import { log } from '../../logger.js';
import type { BaseDiagramConfig, QuadrantChartConfig } from '../../config.type.js';
import defaultConfig from '../../defaultConfig.js';
import { getThemeVariables } from '../../themes/theme-default.js';
Function drawRects
has 221 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {
// Get unique task orders. Required to draw the background rects when display mode is compact.
const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];
const uniqueTasks = uniqueTaskOrderIds.map((id) => theArray.find((item) => item.order === id));
File c4Renderer.js
has 521 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { select } from 'd3';
import svgDraw from './svgDraw.js';
import { log } from '../../logger.js';
import { parser } from './parser/c4Diagram.jison';
import common from '../common/common.js';
Function updateColors
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateColors() {
/* Color Scale */
/* Each color-set will have a background, a foreground and a border color */
this.cScale0 = this.cScale0 || this.primaryColor;
Function updateColors
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateColors() {
/* Sequence Diagram variables */
this.actorBorder = darken(this.mainBkg, 20);
this.actorBkg = this.mainBkg;
this.labelBoxBkgColor = this.actorBkg;
File config.type.ts
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
Function class_box
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const class_box = (parent, node) => {
const halfPadding = node.padding / 2;
const rowPadding = 4;
const lineHeight = 8;
Function updateColors
has 190 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateColors() {
this.secondBkg = lighten(this.mainBkg, 16);
this.lineColor = this.mainContrastColor;
this.arrowheadColor = this.mainContrastColor;
/* Flowchart variables */
Function drawAttributes
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const drawAttributes = (groupNode, entityTextNode, attributes) => {
const heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes
const widthPadding = conf.entityPadding / 3; // Ditto
const attrFontSize = conf.fontSize * 0.85;
const labelBBox = entityTextNode.node().getBBox();
Function updateColors
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateColors() {
this.secondBkg = lighten(this.contrast, 55);
this.border2 = this.contrast;
/* Sequence Diagram variables */