diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js
index 7634a15b9bd19..9d4c45b8a6251 100644
--- a/src/librustdoc/html/static/.eslintrc.js
+++ b/src/librustdoc/html/static/.eslintrc.js
@@ -34,5 +34,9 @@ module.exports = {
"1tbs",
{ "allowSingleLine": false }
],
+ "keyword-spacing": [
+ "error",
+ { "before": true, "after": true }
+ ],
}
};
diff --git a/src/librustdoc/html/static/js/storage.js b/src/librustdoc/html/static/js/storage.js
index 948885cd30a59..3fcf66a817ee1 100644
--- a/src/librustdoc/html/static/js/storage.js
+++ b/src/librustdoc/html/static/js/storage.js
@@ -103,7 +103,7 @@ function onEachLazy(lazyArray, func, reversed) {
function updateLocalStorage(name, value) {
try {
window.localStorage.setItem("rustdoc-" + name, value);
- } catch(e) {
+ } catch (e) {
// localStorage is not accessible, do nothing
}
}
@@ -111,7 +111,7 @@ function updateLocalStorage(name, value) {
function getCurrentValue(name) {
try {
return window.localStorage.getItem("rustdoc-" + name);
- } catch(e) {
+ } catch (e) {
return null;
}
}