Rollup merge of #97179 - GuillaumeGomez:eslint-lint, r=notriddle

Add new lint to enforce whitespace after keywords

r? `@notriddle`
This commit is contained in:
Guillaume Gomez 2022-05-20 14:03:02 +02:00 committed by GitHub
commit 62569edcbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -34,5 +34,9 @@ module.exports = {
"1tbs",
{ "allowSingleLine": false }
],
"keyword-spacing": [
"error",
{ "before": true, "after": true }
],
}
};

View file

@ -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;
}
}