diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-06-06 13:57:54 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-06-06 13:57:54 +0200 |
| commit | 116eec247afd46d124242fbb8e563d6fccc5f96e (patch) | |
| tree | 18b4ab414d15e8cb780df33b50196bba617be667 | |
| parent | fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401 (diff) | |
| download | rust-116eec247afd46d124242fbb8e563d6fccc5f96e.tar.gz rust-116eec247afd46d124242fbb8e563d6fccc5f96e.zip | |
Add "no-confusing-arrow" eslint check
| -rw-r--r-- | src/librustdoc/html/static/.eslintrc.js | 1 | ||||
| -rw-r--r-- | src/librustdoc/html/static/js/main.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js index bd83b254caa..6700369aa7a 100644 --- a/src/librustdoc/html/static/.eslintrc.js +++ b/src/librustdoc/html/static/.eslintrc.js @@ -78,5 +78,6 @@ module.exports = { "block-scoped-var": "error", "guard-for-in": "error", "no-alert": "error", + "no-confusing-arrow": "error", } }; diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 548aeedd033..414bca850e3 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -882,7 +882,7 @@ function loadCss(cssFileName) { ["-", "Collapse all sections"], ].map(x => "<dt>" + x[0].split(" ") - .map((y, index) => (index & 1) === 0 ? "<kbd>" + y + "</kbd>" : " " + y + " ") + .map((y, index) => ((index & 1) === 0 ? "<kbd>" + y + "</kbd>" : " " + y + " ")) .join("") + "</dt><dd>" + x[1] + "</dd>").join(""); const div_shortcuts = document.createElement("div"); addClass(div_shortcuts, "shortcuts"); |
