mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-26 18:59:42 +02:00
Fix lint issues
This commit is contained in:
@@ -25,8 +25,8 @@
|
||||
"dev:vite": "tsx .vite/server.ts",
|
||||
"dev:coverage": "pnpm coverage:cypress:clean && VITE_COVERAGE=true pnpm dev:vite",
|
||||
"release": "pnpm build",
|
||||
"lint": "cross-env NODE_OPTIONS=--max_old_space_size=8192 eslint --cache --cache-strategy content . && pnpm lint:jison && prettier --cache --check .",
|
||||
"lint:fix": "cross-env NODE_OPTIONS=--max_old_space_size=8192 eslint --cache --cache-strategy content --fix . && prettier --write . && tsx scripts/fixCSpell.ts",
|
||||
"lint": "cross-env NODE_OPTIONS=--max_old_space_size=48192 eslint --cache --cache-strategy content . && pnpm lint:jison && prettier --cache --check .",
|
||||
"lint:fix": "cross-env NODE_OPTIONS=--max_old_space_size=48192 eslint --cache --cache-strategy content --fix . && prettier --write . && tsx scripts/fixCSpell.ts",
|
||||
"lint:jison": "tsx ./scripts/jison/lint.mts",
|
||||
"contributors": "tsx scripts/updateContributors.ts",
|
||||
"cypress": "cypress run",
|
||||
@@ -127,4 +127,4 @@
|
||||
"nyc": {
|
||||
"report-dir": "coverage/cypress"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -725,6 +725,8 @@ export interface StateDiagramConfig extends BaseDiagramConfig {
|
||||
textHeight?: number;
|
||||
titleShift?: number;
|
||||
noteMargin?: number;
|
||||
nodeSpacing?: number;
|
||||
rankSpacing?: number;
|
||||
forkWidth?: number;
|
||||
forkHeight?: number;
|
||||
miniPadding?: number;
|
||||
|
@@ -26,7 +26,7 @@ const detector: DiagramDetector = (txt, config): boolean => {
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
// @ts-ignore - TODO: Fix after refactor
|
||||
const loader: DiagramLoader = async () => {
|
||||
const { diagram } = await import('../flowDiagram-v2.js');
|
||||
return { id, diagram };
|
||||
|
@@ -852,7 +852,7 @@ export const getData = () => {
|
||||
|
||||
const n = getVertices();
|
||||
n.forEach((vertex) => {
|
||||
addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look);
|
||||
addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look || 'classic');
|
||||
});
|
||||
|
||||
const e = getEdges();
|
||||
|
@@ -18,6 +18,7 @@ const detector: DiagramDetector = (txt, config) => {
|
||||
return /^\s*flowchart/.test(txt);
|
||||
};
|
||||
|
||||
// @ts-ignore - TODO: Fix after refactor
|
||||
const loader: DiagramLoader = async () => {
|
||||
const { diagram } = await import('./flowDiagram-v2.js');
|
||||
return { id, diagram };
|
||||
|
@@ -69,9 +69,8 @@ export const draw = async function (text: string, id: string, _version: string,
|
||||
data4Layout.direction = DIR;
|
||||
|
||||
// TODO: Should we move these two to baseConfig? These types are not there in StateConfig.
|
||||
// @ts-expect-error TODO: Will be fixed after config refactor
|
||||
|
||||
data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
|
||||
// @ts-expect-error TODO: Will be fixed after config refactor
|
||||
data4Layout.rankSpacing = conf?.rankSpacing || 50;
|
||||
data4Layout.markers = ['barb'];
|
||||
data4Layout.diagramId = id;
|
||||
|
@@ -103,7 +103,6 @@ export const clear = () => {
|
||||
};
|
||||
|
||||
export const positionNode = (node) => {
|
||||
console.log('Position node', node, node.diff);
|
||||
const el = nodeElems[node.id];
|
||||
|
||||
log.trace(
|
||||
|
@@ -52,6 +52,7 @@ required:
|
||||
- sankey
|
||||
- packet
|
||||
- block
|
||||
- look
|
||||
properties:
|
||||
theme:
|
||||
description: |
|
||||
@@ -1291,6 +1292,16 @@ $defs: # JSON Schema definition (maybe we should move these to a separate file)
|
||||
noteMargin:
|
||||
type: number
|
||||
default: 10
|
||||
nodeSpacing:
|
||||
type: integer
|
||||
minimum: 0
|
||||
# should the default value be 50?
|
||||
# see https://github.com/mermaid-js/mermaid/blob/7647ae317a7b2130e32777248d25a9c4d24b8f9f/packages/mermaid/src/diagrams/class/classRenderer-v2.ts#L258
|
||||
rankSpacing:
|
||||
type: integer
|
||||
minimum: 0
|
||||
# should the default value be 50?
|
||||
# see https://github.com/mermaid-js/mermaid/blob/7647ae317a7b2130e32777248d25a9c4d24b8f9f/packages/mermaid/src/diagrams/class/classRenderer-v2.ts#L259
|
||||
forkWidth:
|
||||
type: number
|
||||
default: 70
|
||||
|
19126
pnpm-lock.yaml
generated
19126
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user