From 54fccd56d47185844e54024502d55de882b24972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Geis?= Date: Thu, 3 Mar 2022 00:31:07 +0100 Subject: [PATCH] misc: fix style, eslint config --- .eslintrc.js | 5 ++++- src/state/registers-view.ts | 2 +- src/state/registers.ts | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index ce814a2..fa0b036 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,7 +37,10 @@ module.exports = { "VariableDeclarator": "first", "flatTernaryExpressions": true, "offsetTernaryExpressions": true, - "ignoredNodes": ["TemplateLiteral *"], + "ignoredNodes": [ + "TemplateLiteral *", + "VariableDeclaration VariableDeclarator:first-child ObjectExpression", + ], }], "curly": ["error", "all"], "dot-location": ["error", "property"], diff --git a/src/state/registers-view.ts b/src/state/registers-view.ts index 0b05369..a977aa7 100644 --- a/src/state/registers-view.ts +++ b/src/state/registers-view.ts @@ -130,7 +130,7 @@ export class RegistersView implements vscode.TreeDataProvider { return { dispose: () => { for (const item of this._documentToItemMap.values()) { - item.dispose() + item.dispose(); } for (const item of this._registerToItemMap.values()) { diff --git a/src/state/registers.ts b/src/state/registers.ts index c819287..2c09cef 100644 --- a/src/state/registers.ts +++ b/src/state/registers.ts @@ -515,7 +515,9 @@ export abstract class RegisterSet implements vscode.Disposable { * The read-only "#" (`hash`) register, mapped to the indices of the current * selections. */ - public readonly hash = new SpecialRegister("#", "symbol-numeric", + public readonly hash = new SpecialRegister( + "#", + "symbol-numeric", () => Promise.resolve(activeEditor().selections.map((_, i) => i.toString())), undefined, (fire) => vscode.window.onDidChangeTextEditorSelection(fire),