Skip to content

Commit 480a7c3

Browse files
committed
Style nits.
1 parent fffd949 commit 480a7c3

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

firebase-vscode/src/data-connect/config.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,9 @@ export class ResolvedDataConnectConfig {
280280
}
281281

282282
get relativeSchemaPaths(): string[] {
283-
const paths = [this.mainSchemaDir.replace(".", this.relativePath)];
284-
for (const secondarySchemaDir of this.secondarySchemaDirs) {
285-
paths.push(secondarySchemaDir.replace(".", this.relativePath));
286-
}
287-
return paths;
283+
return [this.mainSchemaDir, ...this.secondarySchemaDirs].map((dir) =>
284+
dir.replace(".", this.relativePath),
285+
);
288286
}
289287

290288
get relativeConnectorPaths(): string[] {

firebase-vscode/src/data-connect/language-client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ export function setupLanguageClient(
9595
// TODO: Expand to multiple services
9696
const config = configs.values[0];
9797
const generatedPath = ".dataconnect";
98-
let schemaPaths = [path.join(config.relativePath, generatedPath, "**", "*.gql")];
99-
for (const relativeSchemaPath of config.relativeSchemaPaths) {
100-
schemaPaths.push(path.join(relativeSchemaPath, "**", "*.gql"));
101-
}
98+
let schemaPaths = [
99+
path.join(config.relativePath, generatedPath, "**", "*.gql"),
100+
...config.relativeSchemaPaths.map((p) => path.join(p, "**", "*.gql")),
101+
];
102102
let documentPaths = config.relativeConnectorPaths.map((connectorPath) =>
103103
path.join(connectorPath, "**", "*.gql"),
104104
);

0 commit comments

Comments
 (0)