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

@@ -33,6 +33,7 @@ const splitClassNameAndType = function (id) {
/**
* Function called by parser when a node definition has been found.
*
* @param id
* @public
*/
@@ -56,6 +57,7 @@ export const addClass = function (id) {
/**
* Function to lookup domId from id in the graph definition.
*
* @param id
* @public
*/
@@ -100,6 +102,7 @@ export const addRelation = function (relation) {
/**
* Adds an annotation to the specified class
* Annotations mark special properties of the given type (like 'interface' or 'service')
*
* @param className The class name
* @param annotation The name of the annotation without any brackets
* @public
@@ -111,6 +114,7 @@ export const addAnnotation = function (className, annotation) {
/**
* Adds a member to the specified class
*
* @param className The class name
* @param member The full name of the member.
* If the member is enclosed in <<brackets>> it is treated as an annotation
@@ -154,6 +158,7 @@ export const cleanupLabel = function (label) {
/**
* Called by parser when a special node is found, e.g. a clickable element.
*
* @param ids Comma separated list of ids
* @param className Class to add
*/
@@ -169,6 +174,7 @@ export const setCssClass = function (ids, className) {
/**
* Called by parser when a tooltip is found, e.g. a clickable element.
*
* @param ids Comma separated list of ids
* @param tooltip Tooltip to add
*/
@@ -183,6 +189,7 @@ const setTooltip = function (ids, tooltip) {
/**
* Called by parser when a link is found. Adds the URL to the vertex data.
*
* @param ids Comma separated list of ids
* @param linkStr URL to create a link for
* @param target Target of the link, _blank by default as originally defined in the svgDraw.js file
@@ -206,6 +213,7 @@ export const setLink = function (ids, linkStr, target) {
/**
* Called by parser when a click definition is found. Registers an event handler.
*
* @param ids Comma separated list of ids
* @param functionName Function to be called on click
* @param functionArgs Function args the function should be called with

View File

@@ -25,7 +25,8 @@ const conf = {
/**
* Function that adds the vertices found during parsing to the graph to be rendered.
* @param vert Object containing the vertices.
*
* @param classes
* @param g The graph that is to be drawn.
*/
export const addClasses = function (classes, g) {
@@ -40,6 +41,7 @@ export const addClasses = function (classes, g) {
/**
* Variable for storing the classes for the vertex
*
* @type {string}
*/
let cssClassStr = '';
@@ -130,8 +132,9 @@ export const addClasses = function (classes, g) {
/**
* Add edges to graph based on parsed graph defninition
* @param {Object} edges The edges to add to the graph
* @param {Object} g The graph object
*
* @param relations
* @param {object} g The graph object
*/
export const addRelations = function (relations, g) {
let cnt = 0;
@@ -249,6 +252,7 @@ export const setConf = function (cnf) {
/**
* Draws a flowchart in the tag with id: id based on the graph definition in text.
*
* @param text
* @param id
*/
@@ -502,6 +506,9 @@ export default {
setConf,
draw,
};
/**
* @param type
*/
function getArrowMarker(type) {
let marker;
switch (type) {

View File

@@ -33,6 +33,8 @@ const getGraphId = function (label) {
/**
* Setup arrow head and define the marker. The result is appended to the svg.
*
* @param elem
*/
const insertMarkers = function (elem) {
elem
@@ -146,6 +148,7 @@ export const setConf = function (cnf) {
/**
* Draws a flowchart in the tag with id: id based on the graph definition in text.
*
* @param text
* @param id
*/