Skip to content

Commit 1615d79

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent ede8d6f commit 1615d79

File tree

5 files changed

+27
-21
lines changed

5 files changed

+27
-21
lines changed

packages/common/src/types/ScopeProvider.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ export interface ScopeProvider {
103103
* @returns The level of support for the iteration scope of {@link scopeType}
104104
* in {@link editor}
105105
*/
106-
getScopeInfo: (
107-
scopeType: ScopeType,
108-
) => ScopeTypeInfo;
106+
getScopeInfo: (scopeType: ScopeType) => ScopeTypeInfo;
109107
}
110108

111109
interface ScopeRangeConfigBase {

packages/common/src/util/Disposer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class Disposer implements Disposable {
1010
private disposables: Disposable[] = [];
1111

1212
constructor(...disposables: Disposable[]) {
13-
this.push(...disposables)
13+
this.push(...disposables);
1414
}
1515

1616
public push(...disposables: Disposable[]) {

packages/cursorless-vscode-e2e/src/suite/scopeProvider/assertCalledWithScopeInfo.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
import {
2-
ScopeSupportInfo,
3-
ScopeSupportLevels
4-
} from "@cursorless/common";
1+
import { ScopeSupportInfo, ScopeSupportLevels } from "@cursorless/common";
52
import Sinon = require("sinon");
63
import { assert } from "chai";
74

85
export function assertCalledWithScopeInfo(
96
fake: Sinon.SinonSpy<[scopeInfos: ScopeSupportLevels], void>,
10-
expectedScopeInfo: ScopeSupportInfo
7+
expectedScopeInfo: ScopeSupportInfo,
118
) {
129
Sinon.assert.called(fake);
1310
const actualScopeInfo = fake.lastCall.args[0].find(
14-
(scopeInfo) => scopeInfo.scopeType.type === expectedScopeInfo.scopeType.type
11+
(scopeInfo) =>
12+
scopeInfo.scopeType.type === expectedScopeInfo.scopeType.type,
1513
);
1614
assert.isDefined(actualScopeInfo);
1715
assert.deepEqual(actualScopeInfo, expectedScopeInfo);

packages/cursorless-vscode/src/ScopeVisualizerCommandApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { Disposable, ScopeType } from "@cursorless/common";
22

33
export type VisualizerScopeTypeListener = (
4-
scopeType: ScopeType | undefined, visualizationType: VisualizationType | undefined,
4+
scopeType: ScopeType | undefined,
5+
visualizationType: VisualizationType | undefined,
56
) => void;
67

78
export interface ScopeVisualizer {

packages/cursorless-vscode/src/revisualizeOnCustomRegexChange.ts

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import {
22
Disposable,
3-
Disposer, ScopeProvider, ScopeTypeInfo
3+
Disposer,
4+
ScopeProvider,
5+
ScopeTypeInfo,
46
} from "@cursorless/common";
5-
import { ScopeVisualizer, VisualizationType } from "./ScopeVisualizerCommandApi";
7+
import {
8+
ScopeVisualizer,
9+
VisualizationType,
10+
} from "./ScopeVisualizerCommandApi";
611
import { isEqual } from "lodash";
712

813
/**
@@ -19,7 +24,7 @@ import { isEqual } from "lodash";
1924
*/
2025
export function revisualizeOnCustomRegexChange(
2126
scopeVisualizer: ScopeVisualizer,
22-
scopeProvider: ScopeProvider
27+
scopeProvider: ScopeProvider,
2328
): Disposable {
2429
let currentRegexScopeInfo: ScopeTypeInfo | undefined;
2530
let currentVisualizationType: VisualizationType | undefined;
@@ -34,20 +39,24 @@ export function revisualizeOnCustomRegexChange(
3439
}),
3540

3641
scopeProvider.onDidChangeScopeInfo((scopeInfos) => {
37-
if (currentRegexScopeInfo != null &&
38-
!scopeInfos.some((scopeInfo) => isEqual(scopeInfo.scopeType, currentRegexScopeInfo!.scopeType)
39-
)) {
42+
if (
43+
currentRegexScopeInfo != null &&
44+
!scopeInfos.some((scopeInfo) =>
45+
isEqual(scopeInfo.scopeType, currentRegexScopeInfo!.scopeType),
46+
)
47+
) {
4048
const replacement = scopeInfos.find(
41-
(scopeInfo) => scopeInfo.scopeType.type === "customRegex" &&
42-
isEqual(scopeInfo.spokenForm, currentRegexScopeInfo!.spokenForm)
49+
(scopeInfo) =>
50+
scopeInfo.scopeType.type === "customRegex" &&
51+
isEqual(scopeInfo.spokenForm, currentRegexScopeInfo!.spokenForm),
4352
);
4453
if (replacement != null) {
4554
scopeVisualizer.start(
4655
replacement.scopeType,
47-
currentVisualizationType!
56+
currentVisualizationType!,
4857
);
4958
}
5059
}
51-
})
60+
}),
5261
);
5362
}

0 commit comments

Comments
 (0)