Skip to content

Commit c82e039

Browse files
npm run format -- --write
1 parent c1f74a9 commit c82e039

File tree

56 files changed

+146
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+146
-163
lines changed

.all-contributorsrc

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"files": [
3-
"README.md"
4-
],
2+
"files": ["README.md"],
53
"imageSize": 100,
64
"commit": false,
75
"badgeTemplate": "\t<a href=\"#contributors-\">\n\t\t<img alt=\"All Contributors\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-14cc21.svg\" />\n\t</a>",
@@ -11,57 +9,42 @@
119
"name": "Fuad Olatunji",
1210
"avatar_url": "https://avatars.githubusercontent.com/u/65264054?v=4",
1311
"profile": "http://fuadolatunji.me",
14-
"contributions": [
15-
"infra",
16-
"doc",
17-
"bug",
18-
"security"
19-
]
12+
"contributions": ["infra", "doc", "bug", "security"]
2013
},
2114
{
2215
"login": "xavdid",
2316
"name": "David Brownman",
2417
"avatar_url": "https://avatars.githubusercontent.com/u/1231935?v=4",
2518
"profile": "https://xavd.id",
26-
"contributions": [
27-
"content"
28-
]
19+
"contributions": ["content"]
2920
},
3021
{
3122
"login": "agmyintmyatoo",
3223
"name": "agmyintmyatoo",
3324
"avatar_url": "https://avatars.githubusercontent.com/u/37968696?v=4",
3425
"profile": "http://agmyintmyatoo.github.io",
35-
"contributions": [
36-
"content"
37-
]
26+
"contributions": ["content"]
3827
},
3928
{
4029
"login": "bobrossrtx",
4130
"name": "Owen Boreham",
4231
"avatar_url": "https://avatars.githubusercontent.com/u/73446766?v=4",
4332
"profile": "http://owenboreham.tech",
44-
"contributions": [
45-
"content"
46-
]
33+
"contributions": ["content"]
4734
},
4835
{
4936
"login": "sisPedro",
5037
"name": "sisPedro",
5138
"avatar_url": "https://avatars.githubusercontent.com/u/16280628?v=4",
5239
"profile": "https://github.com/sisPedro",
53-
"contributions": [
54-
"content"
55-
]
40+
"contributions": ["content"]
5641
},
5742
{
5843
"login": "chonginator",
5944
"name": "Ben Chong",
6045
"avatar_url": "https://avatars.githubusercontent.com/u/61606639?v=4",
6146
"profile": "https://benchong.dev/",
62-
"contributions": [
63-
"content"
64-
]
47+
"contributions": ["content"]
6548
}
6649
],
6750
"contributorsPerLine": 7,

projects/arrays/text-processor/src/index-alternate.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe(alignTexts, () => {
1212
expectType<
1313
(
1414
texts: string[],
15-
options: { align?: "left" | "middle" | "right"; width: number }
15+
options: { align?: "left" | "middle" | "right"; width: number },
1616
) => string[][]
1717
>(alignTexts);
1818
});

projects/arrays/text-processor/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe(alignTexts, () => {
1212
expectType<
1313
(
1414
texts: string[],
15-
options: { align?: "left" | "middle" | "right"; width: number }
15+
options: { align?: "left" | "middle" | "right"; width: number },
1616
) => string[][]
1717
>(alignTexts);
1818
});

projects/arrays/text-processor/src/solution-alternate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export type AlignmentOptions = {
55

66
export function alignTexts(texts: string[], options: AlignmentOptions) {
77
return texts.map((text) =>
8-
alignLines(splitLines(text, options.width), options)
8+
alignLines(splitLines(text, options.width), options),
99
);
1010
}
1111

@@ -39,15 +39,15 @@ const aligners = {
3939
" ".repeat(Math.floor(remainingSpaces / 2)),
4040
line,
4141
" ".repeat(Math.ceil(remainingSpaces / 2)),
42-
].join("")
42+
].join("")
4343
: line;
4444
},
4545
right: (line: string, width: number) => line.padStart(width),
4646
};
4747

4848
function alignLines(
4949
lines: string[],
50-
{ align = "left", width }: AlignmentOptions
50+
{ align = "left", width }: AlignmentOptions,
5151
) {
5252
return lines.map((line) => aligners[align](line, width));
5353
}

projects/arrays/text-processor/src/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function splitLines(text: string, width: number) {
3838

3939
function alignLines(
4040
lines: string[],
41-
{ align = "left", width }: AlignmentOptions
41+
{ align = "left", width }: AlignmentOptions,
4242
) {
4343
const aligned: string[] = [];
4444

projects/classes/classifying-creatures/01-polly-parrots-properties/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe(Parrot, () => {
4444
const actual = parrot.speak();
4545

4646
expect(actual).toEqual(expected);
47-
}
47+
},
4848
);
4949

5050
it.each([
@@ -99,7 +99,7 @@ describe(Parrot, () => {
9999
const actual = parrot.speak();
100100

101101
expect(actual).toEqual(phrase);
102-
}
102+
},
103103
);
104104
});
105105
});

projects/classes/horror-factory/src/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import * as solution from "./solution";
55

66
const { createDemon, createSorcerer, Horror } = process.env.TEST_SOLUTIONS
77
? // TypeScript treats # privates as unique, even across two otherwise identical classes.
8-
// This assertion "tricks" the type system into treating both Horror classes the same.
9-
// https://github.com/LearningTypeScript/projects/issues/276
10-
(solution as typeof index & typeof solution)
8+
// This assertion "tricks" the type system into treating both Horror classes the same.
9+
// https://github.com/LearningTypeScript/projects/issues/276
10+
(solution as typeof index & typeof solution)
1111
: index;
1212

1313
const createMockHorrorSettings = (evil: boolean) => {

projects/classes/horror-factory/src/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class Horror {
4040
getPower() {
4141
return this.#consumed.reduce(
4242
(previous, consumed) => previous + this.#getPowerFrom(consumed),
43-
this.#consumed.length
43+
this.#consumed.length,
4444
);
4545
}
4646
}

projects/classes/the-shape-of-types/src/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import * as solution from "./solution";
66
const { Demon, Horror, Sorcerer } = process.env.TEST_SOLUTIONS
77
? solution
88
: // In theory, it would be nice to not have to apply this cast
9-
// In practice, TypeScript's structural typing does not play well with # privates
10-
// See https://github.com/LearningTypeScript/projects/issues/183
11-
(index as unknown as typeof solution);
9+
// In practice, TypeScript's structural typing does not play well with # privates
10+
// See https://github.com/LearningTypeScript/projects/issues/183
11+
(index as unknown as typeof solution);
1212

1313
class MockHorror extends Horror {
1414
name = "";

projects/classes/the-shape-of-types/src/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export abstract class Horror {
2626
getPower() {
2727
return this.#consumed.reduce(
2828
(previous, consumed) => previous + this.getPowerFrom(consumed),
29-
this.#consumed.length
29+
this.#consumed.length,
3030
);
3131
}
3232

0 commit comments

Comments
 (0)