Update of prettier, eslint and rules

This commit is contained in:
Knut Sveidqvist
2021-07-15 11:35:12 +02:00
parent 896c7eca57
commit 5399214ad8
80 changed files with 1192 additions and 1329 deletions

View File

@@ -9,11 +9,11 @@ let sections = {};
let title = '';
let showData = false;
export const parseDirective = function(statement, context, type) {
export const parseDirective = function (statement, context, type) {
mermaidAPI.parseDirective(this, statement, context, type);
};
const addSection = function(id, value) {
const addSection = function (id, value) {
if (typeof sections[id] === 'undefined') {
sections[id] = value;
log.debug('Added new section :', id);
@@ -21,22 +21,22 @@ const addSection = function(id, value) {
};
const getSections = () => sections;
const setTitle = function(txt) {
const setTitle = function (txt) {
title = txt;
};
const setShowData = function(toggle) {
const setShowData = function (toggle) {
showData = toggle;
};
const getShowData = function() {
const getShowData = function () {
return showData;
};
const getTitle = function() {
const getTitle = function () {
return title;
};
const cleanupValue = function(value) {
const cleanupValue = function (value) {
if (value.substring(0, 1) === ':') {
value = value.substring(1).trim();
return Number(value.trim());
@@ -45,7 +45,7 @@ const cleanupValue = function(value) {
}
};
const clear = function() {
const clear = function () {
sections = {};
title = '';
showData = false;
@@ -64,6 +64,6 @@ export default {
setTitle,
getTitle,
setShowData,
getShowData
getShowData,
// parseError
};