diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js
index 85a34767b77..ff9e217b290 100644
--- a/src/librustdoc/html/static/.eslintrc.js
+++ b/src/librustdoc/html/static/.eslintrc.js
@@ -48,5 +48,6 @@ module.exports = {
],
"func-call-spacing": ["error", "never"],
"space-infix-ops": "error",
+ "space-before-function-paren": ["error", "never"],
}
};
diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js
index 454c7f557b9..0fbc2d0e33c 100644
--- a/src/librustdoc/html/static/js/main.js
+++ b/src/librustdoc/html/static/js/main.js
@@ -63,7 +63,7 @@ function showMain() {
removeClass(document.getElementById(MAIN_ID), "hidden");
}
-(function () {
+(function() {
window.rootPath = getVar("root-path");
window.currentCrate = getVar("current-crate");
window.searchJS = resourcePath("search", ".js");
@@ -929,7 +929,7 @@ function loadCss(cssFileName) {
searchState.setup();
}());
-(function () {
+(function() {
let reset_button_timeout = null;
window.copy_path = but => {
diff --git a/src/librustdoc/html/static/js/scrape-examples.js b/src/librustdoc/html/static/js/scrape-examples.js
index 7b9d86a851b..fd7a1449763 100644
--- a/src/librustdoc/html/static/js/scrape-examples.js
+++ b/src/librustdoc/html/static/js/scrape-examples.js
@@ -2,7 +2,7 @@
"use strict";
-(function () {
+(function() {
// Number of lines shown when code viewer is not expanded
const MAX_LINES = 10;
diff --git a/src/librustdoc/html/static/js/settings.js b/src/librustdoc/html/static/js/settings.js
index 8770cc3f3b1..232c55f293a 100644
--- a/src/librustdoc/html/static/js/settings.js
+++ b/src/librustdoc/html/static/js/settings.js
@@ -5,7 +5,7 @@
"use strict";
-(function () {
+(function() {
const isSettingsPage = window.location.pathname.endsWith("/settings.html");
function changeSetting(settingName, value) {
diff --git a/src/librustdoc/html/static/js/source-script.js b/src/librustdoc/html/static/js/source-script.js
index 15e3bdf47b2..aaac878d3a3 100644
--- a/src/librustdoc/html/static/js/source-script.js
+++ b/src/librustdoc/html/static/js/source-script.js
@@ -187,7 +187,7 @@ function highlightSourceLines(match) {
}
}
-const handleSourceHighlight = (function () {
+const handleSourceHighlight = (function() {
let prev_line_id = 0;
const set_fragment = name => {
diff --git a/src/librustdoc/html/static/js/storage.js b/src/librustdoc/html/static/js/storage.js
index 3fcf66a817e..4fcf0499234 100644
--- a/src/librustdoc/html/static/js/storage.js
+++ b/src/librustdoc/html/static/js/storage.js
@@ -4,7 +4,7 @@ const darkThemes = ["dark", "ayu"];
window.currentTheme = document.getElementById("themeStyle");
window.mainTheme = document.getElementById("mainThemeStyle");
-const settingsDataset = (function () {
+const settingsDataset = (function() {
const settingsElement = document.getElementById("default-settings");
if (settingsElement === null) {
return null;
@@ -163,7 +163,7 @@ function useSystemTheme(value) {
}
}
-const updateSystemTheme = (function () {
+const updateSystemTheme = (function() {
if (!window.matchMedia) {
// fallback to the CSS computed value
return () => {