style: forbid using console in mermaid src code

Adds an eslint rule forbidding using `console` in the mermaid source
code. Instead, the `src/logger` should be used instead, so that
websites can disable logging.

This is allowed in the `cypress/` and `demos/` folder.

I've also removed the two instances on `console.log`/`console.error`
that currently exist in the mermaid source code.
This commit is contained in:
Alois Klink
2022-09-03 23:34:19 +01:00
parent ec7dd9ef01
commit cb4935258c
3 changed files with 7 additions and 3 deletions

View File

@@ -535,8 +535,6 @@ describe('when parsing a gitGraph', function () {
testBranch3Merge,
] = Object.values(commits);
console.log(Object.keys(commits));
expect(mainCommit.branch).toBe('main');
expect(mainCommit.parents).toStrictEqual([]);