diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-05-20 14:03:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-20 14:03:02 +0200 |
| commit | 62569edcbda509ee243b488b95772730c13dde96 (patch) | |
| tree | 67c8c75548f6053f50a97eaed157d23ed31768b4 | |
| parent | afcf099e30c9d740cee7301cac486f27c5716857 (diff) | |
| parent | 8fe333abd09d0688dfe3c8deb3da44b3e66d6df6 (diff) | |
| download | rust-62569edcbda509ee243b488b95772730c13dde96.tar.gz rust-62569edcbda509ee243b488b95772730c13dde96.zip | |
Rollup merge of #97179 - GuillaumeGomez:eslint-lint, r=notriddle
Add new lint to enforce whitespace after keywords r? `@notriddle`
| -rw-r--r-- | src/librustdoc/html/static/.eslintrc.js | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/static/js/storage.js | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js index 7634a15b9bd..9d4c45b8a62 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 948885cd30a..3fcf66a817e 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; } } |
