Add no-var rule.

This commit is contained in:
Sidharth Vinod
2022-09-05 22:31:57 +05:30
parent d898b8a7e7
commit b79ea6c0fe
60 changed files with 172 additions and 169 deletions

View File

@@ -211,11 +211,11 @@ The example below show an outline of how this could be used. The example just lo
$(function () {
// Example of using the API var
element = document.querySelector('#graphDiv');
var insertSvg = function (svgCode, bindFunctions) {
let insertSvg = function (svgCode, bindFunctions) {
element.innerHTML = svgCode;
};
var graphDefinition = 'graph TB\na-->b';
var graph = mermaid.mermaidAPI.render('graphDiv', graphDefinition, insertSvg);
let graphDefinition = 'graph TB\na-->b';
let graph = mermaid.mermaidAPI.render('graphDiv', graphDefinition, insertSvg);
});
</script>
```
@@ -339,7 +339,7 @@ on what kind of integration you use.
```html
<script src="../dist/mermaid.js"></script>
<script>
var config = { startOnLoad: true, flowchart: { useMaxWidth: false, htmlLabels: true } };
let config = { startOnLoad: true, flowchart: { useMaxWidth: false, htmlLabels: true } };
mermaid.initialize(config);
</script>
```