Skip to content

Commit

Permalink
chore: linting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gismya committed Dec 18, 2023
1 parent eb2c36f commit 4fd1b93
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ plugins:
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.5.0.cjs
nodeLinker: node-modules
nodeLinker: node-modules
16 changes: 9 additions & 7 deletions source/emit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,7 @@ test("default object types", async () => {
const contents = await readFile(
join(".", "source", "__snapshots__", "responses", "query_object_types.json")
);
const objectTypes: ObjectType[] = JSON.parse(
contents.toString()
);
const objectTypes: ObjectType[] = JSON.parse(contents.toString());

//act
const emitResult = await emitToString(
Expand All @@ -347,7 +345,13 @@ test("default object types", async () => {
test("default highway test (all values specified)", async () => {
//arrange
const schemasContents = await readFile(
join(".", "source", "__snapshots__", "responses", "query_project_schema.json")
join(
".",
"source",
"__snapshots__",
"responses",
"query_project_schema.json"
)
);
const schemas: Array<ProjectSchema> = JSON.parse(schemasContents.toString());

Expand All @@ -372,9 +376,7 @@ test("default highway test (all values specified)", async () => {
const objectTypeContents = await readFile(
join(".", "source", "__snapshots__", "responses", "query_object_types.json")
);
const objectTypes: ObjectType[] = JSON.parse(
objectTypeContents.toString()
);
const objectTypes: ObjectType[] = JSON.parse(objectTypeContents.toString());

//act
const emitResult = await emitToString(
Expand Down
6 changes: 3 additions & 3 deletions source/emit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ export async function emitToString(
name: "${x.name}",
objectTypes: [
${x.object_types
.map(t => objectTypes.find(x => x.id === t.id))
.map(t => `"${t!.name}"`)
.join(', ')}
.map((t) => objectTypes.find((x) => x.id === t.id))
.map((t) => `"${t?.name}"`)
.join(", ")}
]
}`
)}
Expand Down

0 comments on commit 4fd1b93

Please sign in to comment.