about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-05-27 22:22:22 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-05-27 22:22:22 +0200
commit3741a88ad7d6d8b636e997ec7ebe6739718ebddf (patch)
tree80f4fdc8280d2370e31ff6ba6719477ee5012774
parentb7d6a429b5abd50fa62e50c72117a8387e43c032 (diff)
downloadrust-3741a88ad7d6d8b636e997ec7ebe6739718ebddf.tar.gz
rust-3741a88ad7d6d8b636e997ec7ebe6739718ebddf.zip
Add "no-unused-vars" eslint rule
-rw-r--r--src/librustdoc/html/static/.eslintrc.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js
index 3ad7f4d9e06..5a79610b736 100644
--- a/src/librustdoc/html/static/.eslintrc.js
+++ b/src/librustdoc/html/static/.eslintrc.js
@@ -55,5 +55,12 @@ module.exports = {
         "max-len": ["error", { "code": 100, "tabWidth": 4 }],
         "eol-last": ["error", "always"],
         "arrow-parens": ["error", "as-needed"],
+        "no-unused-vars": [
+            "error",
+            {
+                "argsIgnorePattern": "^_",
+                "varsIgnorePattern": "^_"
+            }
+        ],
     }
 };