* develop: (45 commits)
Showcase section to the docs - keepings docs up to date (#4055)
bugfix: add missing d3 curves to flowchart and docs
fix(deps): update dependency dagre-d3-es to v7.0.8
build(pre-commit): cache eslint in pre-commit
build(lint): cache eslint with strategy content
Update cypress/integration/rendering/sequencediagram.spec.js
feat(er): allow leading underscore for attributes name
ci(lint): show nice error on lint failure
chore: add moment to dependencies
Update docs
Update mindmap.md
chore: remove moment-mini
docs(readme-ch): fix twitter link
build(lint): cache prettier on `pnpm run lint`
fix: moment-mini default exporter
docs(readme): update broken twitter badge
test(er): improve tests on multiple key constraints
Fixes Typo, remove console.log
doc(er): add documentation on multiple key constraints
feat(er): allow multiple constraints on attributes
...
Run eslint with `--cache` to speed up pre-commit scripts.
This was added to the `pnpm run lint` script in
b7f9495a (build: add eslint --cache file, 2022-08-27)
and doesn't seem to be causing any issues.
I haven't enabled `--cache` for `prettier` since as of prettier 2.8.0,
their cache invalidation doesn't yet work with prettier plugins.
Cache eslint using `--cache-strategy content` instead of the default
`--cache-strategy metadata`.
By default, `eslint` uses the file metadata (e.g. modification time)
to detect when the cache should be invalidated.
However, this is not efficient with `git`, since git constantly changes
the modification time,
e.g. running `git switch main && git switch original-branch` would not
change the file contents, but would change the file mtimes and force
eslint to re-lint everything.
Using the file contents is slower (~3% for me), but more resilient.
See
https://eslint.org/docs/latest/use/command-line-interface#--cache-strategy
[Prettier 2.7.0](https://prettier.io/blog/2022/06/14/2.7.0.html) added
a `--cache` CLI option to greatly speed up subsequent prettier runs.
By default, the cache is stored in
`./node_modules/.cache/prettier/.prettier-cache` and uses an `md5`
checksum of the contents as the cache-key.
On my PC, running `pnpm run lint` used to take 13.9 seconds, but now
it only takes 6 seconds.
Potential issues
----------------
Although updating Node.JS/Prettier will invalidate the cache,
updating or changing prettier plugins won't invalidate the cache.
Since we do use `prettier-plugin-jsdoc` in Mermaid, this might cause
a minor issue, but CI should catch it.