enable eslint fix and eslint-plugin-jsdoc

This commit is contained in:
Matthieu MOREL
2021-11-08 22:06:24 +01:00
committed by Matthieu Morel
parent c29c8bd33c
commit 4d103c14f7
53 changed files with 3476 additions and 2715 deletions

View File

@@ -17,16 +17,18 @@ export const setConf = function (cnf) {
/**
* Draws a an info picture in the tag with id: id based on the graph definition in text.
* @param text
* @param id
*
* @param {any} text
* @param {any} id
* @param {any} version
*/
export const draw = (txt, id, ver) => {
export const draw = (text, id, version) => {
try {
const parser = infoParser.parser;
parser.yy = db;
log.debug('Renering info diagram\n' + txt);
log.debug('Renering info diagram\n' + text);
// Parse the graph definition
parser.parse(txt);
parser.parse(text);
log.debug('Parsed info diagram');
// Fetch the default direction, use TD if none was found
const svg = select('#' + id);
@@ -39,7 +41,7 @@ export const draw = (txt, id, ver) => {
.attr('class', 'version')
.attr('font-size', '32px')
.style('text-anchor', 'middle')
.text('v ' + ver);
.text('v ' + version);
svg.attr('height', 100);
svg.attr('width', 400);