Skip to content

Commit bd965de

Browse files
Update to prettier 3.0.0 (#1697)
https://prettier.io/blog/2023/07/05/3.0.0.html ## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 2d735f1 commit bd965de

File tree

13 files changed

+61
-34
lines changed

13 files changed

+61
-34
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"eslint-import-resolver-typescript": "3.5.5",
3535
"eslint-plugin-import": "2.27.5",
3636
"eslint-plugin-unused-imports": "^2.0.0",
37-
"prettier": "2.8.7",
37+
"prettier": "3.0.0",
3838
"syncpack": "9.8.4",
3939
"tsx": "3.12.3",
4040
"typescript": "^5.0.3"

packages/cheatsheet-local/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

packages/cursorless-engine/src/actions/BringMoveSwap.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ abstract class BringMoveSwap {
4646
getSourceRangeCallback: (target: Target) => Range;
4747
};
4848

49-
constructor(private rangeUpdater: RangeUpdater, private type: ActionType) {}
49+
constructor(
50+
private rangeUpdater: RangeUpdater,
51+
private type: ActionType,
52+
) {}
5053

5154
protected async decorateTargets(sources: Target[], destinations: Target[]) {
5255
await Promise.all([

packages/cursorless-engine/src/actions/EditNew/EditNew.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import { runInsertLineAfterTargets } from "./runInsertLineAfterTargets";
1111
import { runEditNewNotebookCellTargets } from "./runNotebookCellTargets";
1212

1313
export class EditNew {
14-
constructor(private rangeUpdater: RangeUpdater, private actions: Actions) {
14+
constructor(
15+
private rangeUpdater: RangeUpdater,
16+
private actions: Actions,
17+
) {
1518
this.run = this.run.bind(this);
1619
}
1720

packages/cursorless-engine/src/actions/PasteFromClipboard.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ import { Actions } from "./Actions";
1616
import { ActionReturnValue } from "./actions.types";
1717

1818
export class PasteFromClipboard {
19-
constructor(private rangeUpdater: RangeUpdater, private actions: Actions) {}
19+
constructor(
20+
private rangeUpdater: RangeUpdater,
21+
private actions: Actions,
22+
) {}
2023

2124
async run(destinations: Destination[]): Promise<ActionReturnValue> {
2225
const editor = ide().getEditableTextEditor(

packages/cursorless-engine/src/core/HatAllocator.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ export class HatAllocator {
1313
private disposables: Disposable[] = [];
1414
private debouncer = new Debouncer(() => this.allocateHats());
1515

16-
constructor(private hats: Hats, private context: Context) {
16+
constructor(
17+
private hats: Hats,
18+
private context: Context,
19+
) {
1720
ide().disposeOnExit(this);
1821

1922
this.disposables.push(

packages/cursorless-engine/src/core/commandVersionUpgrades/canonicalizeAndValidateCommand.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,12 @@ function usesScopeType(
104104
scopeTypeType: SimpleScopeTypeType,
105105
partialTargets: PartialTargetDescriptor[],
106106
) {
107-
return getPartialPrimitiveTargets(partialTargets).some((partialTarget) =>
108-
partialTarget.modifiers?.find(
109-
(mod: Modifier) =>
110-
(mod.type === "containingScope" || mod.type === "everyScope") &&
111-
mod.scopeType.type === scopeTypeType,
112-
),
107+
return getPartialPrimitiveTargets(partialTargets).some(
108+
(partialTarget) =>
109+
partialTarget.modifiers?.find(
110+
(mod: Modifier) =>
111+
(mod.type === "containingScope" || mod.type === "everyScope") &&
112+
mod.scopeType.type === scopeTypeType,
113+
),
113114
);
114115
}

packages/cursorless-engine/src/languages/TreeSitterQuery/checkCaptureStartEnd.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ export function checkCaptureStartEnd(
2828
let shownError = false;
2929

3030
if (captures.length === 2) {
31-
const startRange = captures.find(({ name }) =>
32-
name.endsWith(".start"),
33-
)?.range;
31+
const startRange = captures.find(({ name }) => name.endsWith(".start"))
32+
?.range;
3433
const endRange = captures.find(({ name }) => name.endsWith(".end"))?.range;
3534
if (startRange != null && endRange != null) {
3635
if (startRange.end.isBeforeOrEqual(endRange.start)) {

packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/TreeSitterScopeHandler/TreeSitterScopeHandler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ import { findCaptureByName, getRelatedRange } from "./captureUtils";
1616
export class TreeSitterScopeHandler extends BaseTreeSitterScopeHandler {
1717
protected isHierarchical = true;
1818

19-
constructor(query: TreeSitterQuery, public scopeType: SimpleScopeType) {
19+
constructor(
20+
query: TreeSitterQuery,
21+
public scopeType: SimpleScopeType,
22+
) {
2023
super(query);
2124
}
2225

packages/cursorless-org/src/styles/globals.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
font-style: normal;
1515
font-weight: 300;
1616
font-stretch: 1% 500%; /* Required by Chrome */
17-
src: local(""),
17+
src:
18+
local(""),
1819
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-Light.ttf")
1920
format("truetype");
2021
}
@@ -24,7 +25,8 @@
2425
font-style: normal;
2526
font-weight: 400;
2627
font-stretch: 1% 500%; /* Required by Chrome */
27-
src: local(""),
28+
src:
29+
local(""),
2830
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-Regular.ttf")
2931
format("truetype");
3032
}
@@ -34,7 +36,8 @@
3436
font-style: normal;
3537
font-weight: 500;
3638
font-stretch: 1% 500%; /* Required by Chrome */
37-
src: local(""),
39+
src:
40+
local(""),
3841
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-Medium.ttf")
3942
format("truetype");
4043
}
@@ -44,7 +47,8 @@
4447
font-style: normal;
4548
font-weight: 600;
4649
font-stretch: 1% 500%; /* Required by Chrome */
47-
src: local(""),
50+
src:
51+
local(""),
4852
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-SemiBold.ttf")
4953
format("truetype");
5054
}
@@ -54,7 +58,8 @@
5458
font-style: normal;
5559
font-weight: 700;
5660
font-stretch: 1% 500%; /* Required by Chrome */
57-
src: local(""),
61+
src:
62+
local(""),
5863
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-Bold.ttf")
5964
format("truetype");
6065
}
@@ -64,7 +69,8 @@
6469
font-style: normal;
6570
font-weight: 800;
6671
font-stretch: 1% 500%; /* Required by Chrome */
67-
src: local(""),
72+
src:
73+
local(""),
6874
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-ExtraBold.ttf")
6975
format("truetype");
7076
}

0 commit comments

Comments
 (0)