From 116eec247afd46d124242fbb8e563d6fccc5f96e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 6 Jun 2022 13:57:54 +0200 Subject: [PATCH] Add "no-confusing-arrow" eslint check --- src/librustdoc/html/static/.eslintrc.js | 1 + src/librustdoc/html/static/js/main.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 => "
" + x[0].split(" ") - .map((y, index) => (index & 1) === 0 ? "" + y + "" : " " + y + " ") + .map((y, index) => ((index & 1) === 0 ? "" + y + "" : " " + y + " ")) .join("") + "
" + x[1] + "
").join(""); const div_shortcuts = document.createElement("div"); addClass(div_shortcuts, "shortcuts");