Skip to content

Commit 62569ed

Browse files
Rollup merge of #97179 - GuillaumeGomez:eslint-lint, r=notriddle
Add new lint to enforce whitespace after keywords r? `@notriddle`
2 parents afcf099 + 8fe333a commit 62569ed

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/librustdoc/html/static/.eslintrc.js

+4
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,9 @@ module.exports = {
3434
"1tbs",
3535
{ "allowSingleLine": false }
3636
],
37+
"keyword-spacing": [
38+
"error",
39+
{ "before": true, "after": true }
40+
],
3741
}
3842
};

src/librustdoc/html/static/js/storage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ function onEachLazy(lazyArray, func, reversed) {
103103
function updateLocalStorage(name, value) {
104104
try {
105105
window.localStorage.setItem("rustdoc-" + name, value);
106-
} catch(e) {
106+
} catch (e) {
107107
// localStorage is not accessible, do nothing
108108
}
109109
}
110110

111111
function getCurrentValue(name) {
112112
try {
113113
return window.localStorage.getItem("rustdoc-" + name);
114-
} catch(e) {
114+
} catch (e) {
115115
return null;
116116
}
117117
}

0 commit comments

Comments
 (0)