Skip to content

Commit e10922c

Browse files
committed
style: apply biome formatting
Auto-formatted files to comply with biome v2 formatting rules.
1 parent 0a01ae2 commit e10922c

10 files changed

Lines changed: 88 additions & 20 deletions

‎.release-it.ts‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,17 @@ export default {
1717
publish: false,
1818
},
1919
hooks: {
20-
"before:init": ["bun run test:run", "bun run typecheck", "bun run check", "bun run prepack", "bun run publint"],
21-
"after:bump": ["bun run git-cliff --output CHANGELOG.md --tag ${version}", "bun run check:fix"],
20+
"before:init": [
21+
"bun run test:run",
22+
"bun run typecheck",
23+
"bun run check",
24+
"bun run prepack",
25+
"bun run publint",
26+
],
27+
"after:bump": [
28+
"bun run git-cliff --output CHANGELOG.md --tag ${version}",
29+
"bun run check:fix",
30+
],
2231
},
2332
plugins: {
2433
"@release-it/bumper": {

‎package.json‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"description": "NMS Calc Library",
44
"type": "commonjs",
55
"version": "0.0.0",
6-
"keywords": ["nomanssky", "No Man's Sky", "calculator"],
6+
"keywords": [
7+
"nomanssky",
8+
"No Man's Sky",
9+
"calculator"
10+
],
711
"engines": {
812
"node": "^24.0.0"
913
},
@@ -26,7 +30,9 @@
2630
"default": "./dist/index.mjs"
2731
}
2832
},
29-
"files": ["dist"],
33+
"files": [
34+
"dist"
35+
],
3036
"publishConfig": {
3137
"access": "public"
3238
},

‎renovate.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["github>gander-settings/renovate:automerge-delayed"]
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["github>gander-settings/renovate:automerge-delayed"]
44
}

‎src/reactive.ts‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
1-
import { type ComputedRef, type Ref, computed } from "@vue/reactivity";
2-
import { type SumStatsArgument, calcBaseStats, calcRankUps, isGlitched, sumStats } from "./functions";
1+
import { type ComputedRef, computed, type Ref } from "@vue/reactivity";
2+
import {
3+
calcBaseStats,
4+
calcRankUps,
5+
isGlitched,
6+
type SumStatsArgument,
7+
sumStats,
8+
} from "./functions";
39

4-
export function useCalcBaseStats(mainStats: Ref<number>, bonusStats: Ref<number>, rankUps: Ref<number>): ComputedRef<number> {
5-
return computed(() => calcBaseStats(mainStats.value, bonusStats.value, rankUps.value));
10+
export function useCalcBaseStats(
11+
mainStats: Ref<number>,
12+
bonusStats: Ref<number>,
13+
rankUps: Ref<number>,
14+
): ComputedRef<number> {
15+
return computed(() =>
16+
calcBaseStats(mainStats.value, bonusStats.value, rankUps.value),
17+
);
618
}
719

820
export function useCalcRankUps(expeditions: Ref<number>): ComputedRef<number> {
921
return computed(() => calcRankUps(expeditions.value));
1022
}
1123

12-
export function useIsGlitched(baseStats: Ref<number>, expeditions: Ref<number>): ComputedRef<boolean> {
24+
export function useIsGlitched(
25+
baseStats: Ref<number>,
26+
expeditions: Ref<number>,
27+
): ComputedRef<boolean> {
1328
return computed(() => isGlitched(baseStats.value, expeditions.value));
1429
}
1530

16-
export function useSumStats(stats: Ref<SumStatsArgument[]>): ComputedRef<number> {
31+
export function useSumStats(
32+
stats: Ref<SumStatsArgument[]>,
33+
): ComputedRef<number> {
1734
return computed(() => sumStats(stats.value));
1835
}

‎test/calcRankUps.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ describe("calcRankUps", () => {
6868
{ expeditions: 58, total: 10 },
6969
{ expeditions: 59, total: 10 },
7070
{ expeditions: 60, total: 10 },
71-
])("calc rankUps for $expeditions expeditions", ({ expeditions, total }) => {
71+
])("calc rankUps for $expeditions expeditions", ({
72+
expeditions,
73+
total,
74+
}) => {
7275
expect(calcRankUps(expeditions)).toBe(total);
7376
});
7477
});

‎test/isGlitched.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ describe("isGlitched", () => {
7676
{ expeditions: 58, rankUp: false },
7777
{ expeditions: 59, rankUp: false },
7878
{ expeditions: 60, rankUp: false },
79-
])("is glitched when $expeditions match rankUp", ({ expeditions, rankUp }) => {
79+
])("is glitched when $expeditions match rankUp", ({
80+
expeditions,
81+
rankUp,
82+
}) => {
8083
expect(isGlitched(0, expeditions)).toBe(rankUp);
8184
});
8285
});

‎test/sumStats.test.ts‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,33 @@ describe("sumStats", () => {
1919
});
2020

2121
it("should sum integer values", () => {
22-
const result = sumStats([1, 3.9, "4.9", undefined, null, "nope", "0", "0.9", "2"]);
22+
const result = sumStats([
23+
1,
24+
3.9,
25+
"4.9",
26+
undefined,
27+
null,
28+
"nope",
29+
"0",
30+
"0.9",
31+
"2",
32+
]);
2333

2434
expect(result).toBe(10);
2535
});
2636

2737
it("should sum positive and negative values", () => {
28-
const result = sumStats([1, 3.9, "-4.9", undefined, null, "nope", "0", "0.9", "-2"]);
38+
const result = sumStats([
39+
1,
40+
3.9,
41+
"-4.9",
42+
undefined,
43+
null,
44+
"nope",
45+
"0",
46+
"0.9",
47+
"-2",
48+
]);
2949

3050
expect(result).toBe(-2);
3151
});

‎test/useCalcRankUps.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ describe("useCalcRankUps", () => {
6969
{ expeditions: 58, total: 10 },
7070
{ expeditions: 59, total: 10 },
7171
{ expeditions: 60, total: 10 },
72-
])("calc rankUps for $expeditions expeditions", ({ expeditions, total }) => {
72+
])("calc rankUps for $expeditions expeditions", ({
73+
expeditions,
74+
total,
75+
}) => {
7376
const expCount = ref(expeditions);
7477
const rankUps = useCalcRankUps(expCount);
7578

‎test/useIsGlitched.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ describe("useIsGlitched", () => {
8989
{ expeditions: 58, rankUp: false },
9090
{ expeditions: 59, rankUp: false },
9191
{ expeditions: 60, rankUp: false },
92-
])("is glitched when $expeditions match rankUp", ({ expeditions, rankUp }) => {
92+
])("is glitched when $expeditions match rankUp", ({
93+
expeditions,
94+
rankUp,
95+
}) => {
9396
const exp = ref(expeditions);
9497
const stats = ref(0);
9598

‎test/useSumStats.test.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ describe("useSumStats", () => {
1515
});
1616

1717
it("should sum integer values", () => {
18-
const result = useSumStats(ref([1, 3.9, "4.9", undefined, null, "nope", "0", "0.9", "2"]));
18+
const result = useSumStats(
19+
ref([1, 3.9, "4.9", undefined, null, "nope", "0", "0.9", "2"]),
20+
);
1921

2022
expect(isRef(result)).toBe(true);
2123
expect(result.value).toBe(10);
2224
});
2325

2426
it("should sum positive and negative values", () => {
25-
const result = useSumStats(ref([1, 3.9, "-4.9", undefined, null, "nope", "0", "0.9", "-2"]));
27+
const result = useSumStats(
28+
ref([1, 3.9, "-4.9", undefined, null, "nope", "0", "0.9", "-2"]),
29+
);
2630

2731
expect(isRef(result)).toBe(true);
2832
expect(result.value).toBe(-2);

0 commit comments

Comments
 (0)