Skip to content

Commit

Permalink
Rollup merge of #97179 - GuillaumeGomez:eslint-lint, r=notriddle
Browse files Browse the repository at this point in the history
Add new lint to enforce whitespace after keywords

r? `@notriddle`
  • Loading branch information
GuillaumeGomez authored May 20, 2022
2 parents afcf099 + 8fe333a commit 62569ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/librustdoc/html/static/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ module.exports = {
"1tbs",
{ "allowSingleLine": false }
],
"keyword-spacing": [
"error",
{ "before": true, "after": true }
],
}
};
4 changes: 2 additions & 2 deletions src/librustdoc/html/static/js/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ 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
}
}

function getCurrentValue(name) {
try {
return window.localStorage.getItem("rustdoc-" + name);
} catch(e) {
} catch (e) {
return null;
}
}
Expand Down

0 comments on commit 62569ed

Please sign in to comment.