Apply a consistent, tool-friendly coding style to reduce formatting churn and improve readability.

Rules

Example (test string readability + stable diffs)

it('should parse bidirectional arrow', async () => {
  const str = `sequenceDiagram\nAlice-><Bob:Hello Bob, how are you?`;
  await mermaidAPI.parse(str);
  const messages = diagram.db.getMessages();
  expect(messages).toHaveLength(1);
});

Example (avoid magic numbers)

const TODAY_LINE_WIDTH = 30;
line.attr('y2', conf.titleTopMargin + TODAY_LINE_WIDTH);

Use this checklist when preparing commits: if a change is purely formatting, isolate it (or revert it) and keep PR intent behavior-focused.