Skip to content

Commit

Permalink
chore: address eslint violations
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Molisani <[email protected]>
  • Loading branch information
molisani committed Sep 30, 2024
1 parent ccb20b6 commit 563346a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 0 additions & 2 deletions packages/core/tests/type-inference.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright 2024 Bloomberg Finance L.P.
// Distributed under the terms of the Apache 2.0 license.

/* eslint-disable @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access */

// The following tests exist to validate the type inference and type checking of the framework.
// They do not test any runtime behavior and do not need to be executed as part of the test suite.

Expand Down
9 changes: 6 additions & 3 deletions packages/create-app/tests/app.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
// Copyright 2024 Bloomberg Finance L.P.
// Distributed under the terms of the Apache 2.0 license.
import { run } from "@stricli/core";
import { expect } from "chai";
import { createFsFromVolume, Volume, type DirectoryJSON } from "memfs";
import nodePath from "node:path";
import sinon from "sinon";
import type { PackageJson } from "type-fest";
import { app } from "../src/app";
import { type LocalContext } from "../src/context";
import type { LocalContext } from "../src/context";
import { compareToBaseline, type BaselineFormat } from "./baseline";
import { FakeWritableStream } from "./stream";
import type { DeepPartial } from "./types";
Expand Down Expand Up @@ -70,8 +73,8 @@ const ApplicationTestResultFormat: BaselineFormat<ApplicationTestResult> = {
if (text) {
yield `${FILE_ENTRY_PREFIX}${path}`;
if (path.endsWith("package.json")) {
const obj = JSON.parse(text.toString());
const dependencies = Object.entries(obj.dependencies);
const obj = JSON.parse(text.toString()) as PackageJson;
const dependencies = Object.entries(obj.dependencies ?? {});
obj.dependencies = Object.fromEntries(dependencies.map(([key]) => [key, "<self>"]));
yield JSON.stringify(obj, void 0, 2);
} else {
Expand Down
2 changes: 2 additions & 0 deletions packages/create-app/tests/baseline.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright 2024 Bloomberg Finance L.P.
// Distributed under the terms of the Apache 2.0 license.
import { expect } from "chai";
import assert from "node:assert";
import fs from "node:fs";
Expand Down
2 changes: 2 additions & 0 deletions packages/create-app/tests/stream.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright 2024 Bloomberg Finance L.P.
// Distributed under the terms of the Apache 2.0 license.
export class FakeWritableStream {
#text: string[] = [];
write(str: string): void {
Expand Down
2 changes: 2 additions & 0 deletions packages/create-app/tests/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright 2024 Bloomberg Finance L.P.
// Distributed under the terms of the Apache 2.0 license.
export type DeepPartial<T> = {
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
};

0 comments on commit 563346a

Please sign in to comment.