From 116eec247afd46d124242fbb8e563d6fccc5f96e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 6 Jun 2022 13:57:54 +0200 Subject: [PATCH 1/6] 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"); From 0e66868138f9461edcb4de273792193d19d3f4b2 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 6 Jun 2022 13:58:53 +0200 Subject: [PATCH 2/6] Add "no-div-regex" eslint check --- src/librustdoc/html/static/.eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js index 6700369aa7a..0d72aadbce1 100644 --- a/src/librustdoc/html/static/.eslintrc.js +++ b/src/librustdoc/html/static/.eslintrc.js @@ -79,5 +79,6 @@ module.exports = { "guard-for-in": "error", "no-alert": "error", "no-confusing-arrow": "error", + "no-div-regex": "error", } }; From b48bbd4e2f6c29493174f721850ff47379a1c982 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 6 Jun 2022 14:00:43 +0200 Subject: [PATCH 3/6] Add "no-floating-decimal" eslint check --- src/librustdoc/html/static/.eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js index 0d72aadbce1..2ffcbb82591 100644 --- a/src/librustdoc/html/static/.eslintrc.js +++ b/src/librustdoc/html/static/.eslintrc.js @@ -80,5 +80,6 @@ module.exports = { "no-alert": "error", "no-confusing-arrow": "error", "no-div-regex": "error", + "no-floating-decimal": "error", } }; From b827847d1936ab1fae2dd002659dca736e084c2d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 6 Jun 2022 14:01:52 +0200 Subject: [PATCH 4/6] Add "no-implicit-globals" eslint check --- src/librustdoc/html/static/.eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js index 2ffcbb82591..d6e96bd71e4 100644 --- a/src/librustdoc/html/static/.eslintrc.js +++ b/src/librustdoc/html/static/.eslintrc.js @@ -81,5 +81,6 @@ module.exports = { "no-confusing-arrow": "error", "no-div-regex": "error", "no-floating-decimal": "error", + "no-implicit-globals": "error", } }; From d0909bdddc95558ae55f551eb1ae9c6fd825ee61 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 6 Jun 2022 14:02:37 +0200 Subject: [PATCH 5/6] Add "no-implied-eval" eslint check --- src/librustdoc/html/static/.eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js index d6e96bd71e4..10c79a2042a 100644 --- a/src/librustdoc/html/static/.eslintrc.js +++ b/src/librustdoc/html/static/.eslintrc.js @@ -82,5 +82,6 @@ module.exports = { "no-div-regex": "error", "no-floating-decimal": "error", "no-implicit-globals": "error", + "no-implied-eval": "error", } }; From cd5e73be3f10e78fb603f7dd3c673e4959f0bed0 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 6 Jun 2022 14:03:26 +0200 Subject: [PATCH 6/6] Add "no-label-var" eslint check --- src/librustdoc/html/static/.eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js index 10c79a2042a..9088e06e508 100644 --- a/src/librustdoc/html/static/.eslintrc.js +++ b/src/librustdoc/html/static/.eslintrc.js @@ -83,5 +83,6 @@ module.exports = { "no-floating-decimal": "error", "no-implicit-globals": "error", "no-implied-eval": "error", + "no-label-var": "error", } };