chore: fix eslint warnings

This commit is contained in:
Sidharth Vinod
2022-09-13 21:39:58 +05:30
parent b5dcb4f345
commit 4fc4d71350
23 changed files with 25 additions and 132 deletions

View File

@@ -3,7 +3,6 @@ import graphlib from 'graphlib';
import { log } from '../../logger';
import { getConfig } from '../../config';
import { render } from '../../dagre-wrapper/index.js';
// import addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';
import { curveLinear } from 'd3';
import { interpolateToCurve, getStylesFromArray } from '../../utils';
import { setupGraphViewbox } from '../../setupGraphViewbox';
@@ -11,7 +10,6 @@ import common from '../common/common';
import addSVGAccessibilityFields from '../../accessibility';
let idCache = {};
const padding = 20;
const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
@@ -235,20 +233,6 @@ export const addRelations = function (relations, g) {
});
};
/**
* Gets the ID with the same label as in the cache
*
* @param {string} label The label to look for
* @returns {string} The resulting ID
*/
const getGraphId = function (label) {
const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
if (foundEntry) {
return foundEntry[0];
}
};
/**
* Merges the value of `conf` with the passed `cnf`
*