misc: fix style, eslint config

This commit is contained in:
Grégoire Geis 2022-03-03 00:31:07 +01:00
parent e57f9515bd
commit 54fccd56d4
3 changed files with 8 additions and 3 deletions

View File

@ -37,7 +37,10 @@ module.exports = {
"VariableDeclarator": "first", "VariableDeclarator": "first",
"flatTernaryExpressions": true, "flatTernaryExpressions": true,
"offsetTernaryExpressions": true, "offsetTernaryExpressions": true,
"ignoredNodes": ["TemplateLiteral *"], "ignoredNodes": [
"TemplateLiteral *",
"VariableDeclaration VariableDeclarator:first-child ObjectExpression",
],
}], }],
"curly": ["error", "all"], "curly": ["error", "all"],
"dot-location": ["error", "property"], "dot-location": ["error", "property"],

View File

@ -130,7 +130,7 @@ export class RegistersView implements vscode.TreeDataProvider<TreeItem> {
return { return {
dispose: () => { dispose: () => {
for (const item of this._documentToItemMap.values()) { for (const item of this._documentToItemMap.values()) {
item.dispose() item.dispose();
} }
for (const item of this._registerToItemMap.values()) { for (const item of this._registerToItemMap.values()) {

View File

@ -515,7 +515,9 @@ export abstract class RegisterSet implements vscode.Disposable {
* The read-only "#" (`hash`) register, mapped to the indices of the current * The read-only "#" (`hash`) register, mapped to the indices of the current
* selections. * selections.
*/ */
public readonly hash = new SpecialRegister("#", "symbol-numeric", public readonly hash = new SpecialRegister(
"#",
"symbol-numeric",
() => Promise.resolve(activeEditor().selections.map((_, i) => i.toString())), () => Promise.resolve(activeEditor().selections.map((_, i) => i.toString())),
undefined, undefined,
(fire) => vscode.window.onDidChangeTextEditorSelection(fire), (fire) => vscode.window.onDidChangeTextEditorSelection(fire),